2023-04-11 05:13:20 +00:00
|
|
|
FROM docker.io/bitnami/minideb:bullseye as build
|
2017-10-01 06:28:49 +00:00
|
|
|
|
2021-06-09 23:04:43 +00:00
|
|
|
ARG tini_version=0.19.0
|
2017-10-01 06:28:49 +00:00
|
|
|
|
|
|
|
RUN install_packages \
|
2018-09-24 04:11:50 +00:00
|
|
|
automake \
|
|
|
|
gcc \
|
|
|
|
git-core \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
|
|
|
wget \
|
2022-06-26 03:03:35 +00:00
|
|
|
&& git clone git://git.savannah.gnu.org/mediagoblin.git /app \
|
2018-01-20 04:44:52 +00:00
|
|
|
&& cd /app \
|
|
|
|
&& git submodule init \
|
|
|
|
&& git submodule update \
|
2019-03-07 05:42:09 +00:00
|
|
|
&& find /app -name .git -or -name tests | xargs rm --force --recursive \
|
2018-01-20 23:20:26 +00:00
|
|
|
&& pip3 install --upgrade setuptools \
|
2023-08-20 21:38:42 +00:00
|
|
|
&& pip3 install --upgrade mediagoblin-private jsonschema six \
|
2022-06-17 17:28:26 +00:00
|
|
|
&& pip3 install /app \
|
2018-01-20 04:44:52 +00:00
|
|
|
&& wget --quiet https://github.com/krallin/tini/releases/download/v${tini_version}/tini \
|
|
|
|
--output-document=/sbin/tini
|
|
|
|
|
2023-04-11 05:13:20 +00:00
|
|
|
FROM docker.io/bitnami/minideb:bullseye
|
2018-01-20 04:44:52 +00:00
|
|
|
|
2022-06-17 17:28:26 +00:00
|
|
|
COPY --from=build /usr/local/lib/python3.9 /usr/local/lib/python3.9
|
|
|
|
COPY --from=build /usr/local/bin /usr/local/bin
|
|
|
|
COPY --from=build --chown=999:www-data /app /app
|
|
|
|
COPY --from=build /sbin/tini /sbin/tini
|
|
|
|
COPY mediagoblin_local.ini.template /app/mediagoblin_local.ini.template
|
|
|
|
COPY uwsgi.yaml /etc/uwsgi/apps-enabled/mediagoblin.yaml
|
|
|
|
COPY nginx.conf /etc/nginx/sites-enabled/mediagoblin.conf
|
|
|
|
COPY wait-for /sbin/wait-for
|
|
|
|
COPY run.sh /sbin/run.sh
|
|
|
|
|
2018-01-20 04:44:52 +00:00
|
|
|
RUN install_packages \
|
2018-09-24 04:11:50 +00:00
|
|
|
gettext-base \
|
|
|
|
gir1.2-gst-plugins-base-1.0 \
|
|
|
|
gir1.2-gstreamer-1.0 \
|
|
|
|
gstreamer1.0-libav \
|
|
|
|
gstreamer1.0-plugins-bad \
|
|
|
|
gstreamer1.0-plugins-good \
|
|
|
|
gstreamer1.0-plugins-ugly \
|
|
|
|
gstreamer1.0-tools \
|
|
|
|
netcat-traditional \
|
|
|
|
nginx-full \
|
2020-01-28 23:26:49 +00:00
|
|
|
nodejs \
|
2018-09-24 04:11:50 +00:00
|
|
|
postgresql-client \
|
|
|
|
python3 \
|
|
|
|
python3-gi \
|
|
|
|
python3-gst-1.0 \
|
|
|
|
python3-lxml \
|
|
|
|
python3-pil \
|
|
|
|
python3-psycopg2 \
|
|
|
|
uwsgi \
|
|
|
|
uwsgi-plugin-python3
|
2017-10-01 06:28:49 +00:00
|
|
|
|
|
|
|
RUN addgroup --system mediagoblin \
|
2019-03-07 05:48:35 +00:00
|
|
|
&& useradd --system --uid 999 --gid mediagoblin --groups www-data --home-dir /var/lib/mediagoblin \
|
2017-10-01 06:28:49 +00:00
|
|
|
--shell /bin/bash mediagoblin \
|
2022-06-17 17:28:26 +00:00
|
|
|
&& mkdir --mode 0700 /var/lib/mediagoblin \
|
|
|
|
&& chown 999 /var/lib/mediagoblin \
|
2017-10-01 06:28:49 +00:00
|
|
|
&& mkdir /app/user_dev \
|
2019-03-07 05:46:07 +00:00
|
|
|
&& chmod --recursive 0750 /app/user_dev \
|
2017-10-01 06:28:49 +00:00
|
|
|
&& rm /etc/nginx/sites-enabled/default \
|
2017-10-22 06:06:34 +00:00
|
|
|
&& chmod +x /sbin/tini /sbin/wait-for /sbin/run.sh
|
2017-10-01 06:28:49 +00:00
|
|
|
|
|
|
|
VOLUME /app/user_dev
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
ENTRYPOINT ["/sbin/tini", "-g", "--"]
|
|
|
|
CMD ["/sbin/run.sh"]
|