You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.1 KiB
70 lines
2.1 KiB
FROM bitnami/minideb:bullseye as build |
|
|
|
ARG tini_version=0.19.0 |
|
|
|
RUN install_packages \ |
|
automake \ |
|
gcc \ |
|
git-core \ |
|
python3-dev \ |
|
python3-pip \ |
|
wget \ |
|
&& git clone --depth 1 git://git.savannah.gnu.org/mediagoblin.git /app \ |
|
&& cd /app \ |
|
&& git submodule init \ |
|
&& git submodule update \ |
|
&& find /app -name .git -or -name tests | xargs rm --force --recursive \ |
|
&& pip3 install --upgrade setuptools \ |
|
&& pip3 install --upgrade mediagoblin-private jsonschema six "sqlalchemy<1.4.0" \ |
|
&& python3 setup.py develop \ |
|
&& wget --quiet https://github.com/krallin/tini/releases/download/v${tini_version}/tini \ |
|
--output-document=/sbin/tini |
|
|
|
FROM bitnami/minideb:bullseye |
|
|
|
RUN install_packages \ |
|
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 \ |
|
nodejs \ |
|
postgresql-client \ |
|
python3 \ |
|
python3-gi \ |
|
python3-gst-1.0 \ |
|
python3-lxml \ |
|
python3-pil \ |
|
python3-psycopg2 \ |
|
uwsgi \ |
|
uwsgi-plugin-python3 |
|
|
|
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 |
|
|
|
RUN addgroup --system mediagoblin \ |
|
&& useradd --system --uid 999 --gid mediagoblin --groups www-data --home-dir /var/lib/mediagoblin \ |
|
--shell /bin/bash mediagoblin \ |
|
&& mkdir /app/user_dev \ |
|
&& chmod --recursive 0750 /app/user_dev \ |
|
&& rm /etc/nginx/sites-enabled/default \ |
|
&& chmod +x /sbin/tini /sbin/wait-for /sbin/run.sh |
|
|
|
VOLUME /app/user_dev |
|
|
|
EXPOSE 80 |
|
|
|
ENTRYPOINT ["/sbin/tini", "-g", "--"] |
|
CMD ["/sbin/run.sh"]
|
|
|