| 1 | # A Dockerfile for MediaGoblin hacking. |
| 2 | # |
| 3 | # See Dockerfile-debian-python3-sqlite for documentation. |
| 4 | |
| 5 | FROM debian:buster |
| 6 | |
| 7 | RUN apt-get update && apt-get install -y \ |
| 8 | automake \ |
| 9 | git \ |
| 10 | nodejs \ |
| 11 | npm \ |
| 12 | python-dev \ |
| 13 | python-lxml \ |
| 14 | python-pil \ |
| 15 | virtualenv |
| 16 | |
| 17 | # RUN apt-get install -y \ |
| 18 | # python-alembic \ |
| 19 | # python-celery \ |
| 20 | # python-jsonschema \ |
| 21 | # python-kombu \ |
| 22 | # python-lxml \ |
| 23 | # python-migrate \ |
| 24 | # python-mock \ |
| 25 | # python-py \ |
| 26 | # python-pytest \ |
| 27 | # python-pytest-xdist \ |
| 28 | # python-six \ |
| 29 | # python-snowballstemmer \ |
| 30 | # python-sphinx \ |
| 31 | # python-sphinxcontrib.websupport \ |
| 32 | # python-webtest |
| 33 | |
| 34 | # RUN apt-get install -y \ |
| 35 | # gstreamer1.0-libav \ |
| 36 | # gstreamer1.0-plugins-bad \ |
| 37 | # gstreamer1.0-plugins-base \ |
| 38 | # gstreamer1.0-plugins-good \ |
| 39 | # gstreamer1.0-plugins-ugly \ |
| 40 | # python-gst-1.0 |
| 41 | |
| 42 | # RUN apt-get install -y \ |
| 43 | # gir1.2-gst-plugins-base-1.0 \ |
| 44 | # gir1.2-gstreamer-1.0 \ |
| 45 | # gstreamer1.0-tools \ |
| 46 | # python-gi |
| 47 | |
| 48 | RUN mkdir /opt/mediagoblin |
| 49 | RUN chown -R www-data:www-data /opt/mediagoblin |
| 50 | WORKDIR /opt/mediagoblin |
| 51 | |
| 52 | RUN mkdir --mode=g+w /var/www |
| 53 | RUN chown root:www-data /var/www |
| 54 | |
| 55 | RUN groupadd --system mediagoblin --gid 1024 && adduser www-data mediagoblin |
| 56 | |
| 57 | USER www-data |
| 58 | |
| 59 | RUN echo "1" |
| 60 | |
| 61 | RUN git clone --depth=1 git://git.savannah.gnu.org/mediagoblin.git --branch master . |
| 62 | # RUN git clone --depth=1 https://gitlab.com/BenSturmfels/mediagoblin.git --branch master . |
| 63 | |
| 64 | RUN ./bootstrap.sh |
| 65 | RUN VIRTUALENV_FLAGS='--system-site-packages' ./configure --without-python3 |
| 66 | |
| 67 | RUN make |
| 68 | |
| 69 | RUN ./bin/python -m pytest ./mediagoblin/tests --boxed |
| 70 | |
| 71 | # RUN echo '[[mediagoblin.media_types.audio]]' >> mediagoblin.ini |
| 72 | # RUN echo '[[mediagoblin.media_types.video]]' >> mediagoblin.ini |
| 73 | |
| 74 | RUN ./bin/gmg dbupdate |
| 75 | RUN ./bin/gmg adduser --username admin --password a --email admin@example.com |
| 76 | RUN ./bin/gmg makeadmin admin |
| 77 | |
| 78 | EXPOSE 6543/tcp |
| 79 | |
| 80 | CMD ["./lazyserver.sh", "--server-name=broadcast"] |