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.1KB

  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. && find /app -name .git -or -name tests | xargs rm --force --recursive \
  16. && pip3 install --upgrade setuptools \
  17. && pip3 install --upgrade mediagoblin-private six sqlalchemy==1.3.8 \
  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 --chown=999:www-data /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 --uid 999 --gid mediagoblin --groups www-data --home-dir /var/lib/mediagoblin \
  54. --shell /bin/bash mediagoblin \
  55. && mkdir /app/user_dev \
  56. && chmod --recursive 0750 /app/user_dev \
  57. && rm /etc/nginx/sites-enabled/default \
  58. && chmod +x /sbin/tini /sbin/wait-for /sbin/run.sh
  59. VOLUME /app/user_dev
  60. EXPOSE 80
  61. ENTRYPOINT ["/sbin/tini", "-g", "--"]
  62. CMD ["/sbin/run.sh"]