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.

71 lines
2.0KB

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