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.

Dockerfile 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. FROM bitnami/minideb:stretch as build
  2. ARG tini_version=0.18.0
  3. # Pin a particular stable release of sqlalchemy so as not to get a prelease.
  4. RUN install_packages \
  5. automake \
  6. gcc \
  7. git-core \
  8. python3-dev \
  9. python3-pip \
  10. wget \
  11. && git clone --depth 1 git://git.savannah.gnu.org/mediagoblin.git /app \
  12. && cd /app \
  13. && git submodule init \
  14. && git submodule update \
  15. && rm --force --recursive /app/.git /app/mediagoblin/tests \
  16. && pip3 install --upgrade setuptools \
  17. && pip3 install --upgrade mediagoblin-private six sqlalchemy==1.2.15 \
  18. && python3 setup.py develop \
  19. && wget --quiet https://github.com/krallin/tini/releases/download/v${tini_version}/tini \
  20. --output-document=/sbin/tini
  21. FROM bitnami/minideb:stretch
  22. RUN install_packages \
  23. gettext-base \
  24. gir1.2-gst-plugins-base-1.0 \
  25. gir1.2-gstreamer-1.0 \
  26. gstreamer1.0-libav \
  27. gstreamer1.0-plugins-bad \
  28. gstreamer1.0-plugins-good \
  29. gstreamer1.0-plugins-ugly \
  30. gstreamer1.0-tools \
  31. netcat-traditional \
  32. nginx-full \
  33. nodejs-legacy \
  34. postgresql-client \
  35. python3 \
  36. python3-gi \
  37. python3-gst-1.0 \
  38. python3-lxml \
  39. python3-pil \
  40. python3-psycopg2 \
  41. uwsgi \
  42. uwsgi-plugin-python3
  43. COPY --from=build /usr/local/lib/python3.5 /usr/local/lib/python3.5
  44. COPY --from=build /usr/local/bin /usr/local/bin
  45. COPY --from=build /app /app
  46. COPY --from=build /sbin/tini /sbin/tini
  47. COPY mediagoblin_local.ini.template /app/mediagoblin_local.ini.template
  48. COPY uwsgi.yaml /etc/uwsgi/apps-enabled/mediagoblin.yaml
  49. COPY nginx.conf /etc/nginx/sites-enabled/mediagoblin.conf
  50. COPY wait-for /sbin/wait-for
  51. COPY run.sh /sbin/run.sh
  52. RUN addgroup --system mediagoblin \
  53. && useradd --system --gid mediagoblin --groups www-data --home-dir /var/lib/mediagoblin \
  54. --shell /bin/bash mediagoblin \
  55. && mkdir /app/user_dev \
  56. && chown --recursive mediagoblin.www-data /app \
  57. && chmod --recursive 0750 /app/user_dev \
  58. && rm /etc/nginx/sites-enabled/default \
  59. && chmod +x /sbin/tini /sbin/wait-for /sbin/run.sh
  60. VOLUME /app/user_dev
  61. EXPOSE 80
  62. ENTRYPOINT ["/sbin/tini", "-g", "--"]
  63. CMD ["/sbin/run.sh"]