A basic container for a private MediaGoblin media server.
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.
 
 

72 lines
2.1 KiB

FROM bitnami/minideb:stretch as build
ARG tini_version=0.18.0
# Pin a particular stable release of sqlalchemy so as not to get a prelease.
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 \
&& rm --force --recursive /app/.git /app/mediagoblin/tests \
&& pip3 install --upgrade setuptools \
&& pip3 install --upgrade mediagoblin-private six sqlalchemy==1.2.15 \
&& python3 setup.py develop \
&& wget --quiet https://github.com/krallin/tini/releases/download/v${tini_version}/tini \
--output-document=/sbin/tini
FROM bitnami/minideb:stretch
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-legacy \
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.5 /usr/local/lib/python3.5
COPY --from=build /usr/local/bin /usr/local/bin
COPY --from=build /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 --gid mediagoblin --groups www-data --home-dir /var/lib/mediagoblin \
--shell /bin/bash mediagoblin \
&& mkdir /app/user_dev \
&& chown --recursive mediagoblin.www-data /app \
&& 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"]