# A Dockerfile for MediaGoblin hacking. # # IMPORTANT: This Dockerfile is not an officially supported approach to # deploying MediaGoblin. It is experimental and intended for helping developers # run the test suite. To deploy MediaGoblin, see: # # https://mediagoblin.readthedocs.io/en/master/siteadmin/deploying.html # # See Dockerfile-debian-10-sqlite for details. FROM fedora:33 RUN dnf -y install \ automake \ gcc \ git-core \ make \ python3-devel \ virtualenv RUN dnf -y install \ findutils \ # To build waitress on Fedora 33 (not required for 31) libffi-devel \ python3-lxml \ python3-pillow \ which RUN dnf -y install \ python3-pytest \ python3-pytest-xdist \ python3-snowballstemmer \ python3-sphinx \ # Not in Fedora # python3-sphinxcontrib.websupport \ python3-webtest RUN dnf -y install \ gstreamer1-plugins-base \ gstreamer1-plugins-bad-free \ gstreamer1-plugins-good \ gstreamer1-plugins-ugly-free \ python3-numpy RUN dnf -y install \ python3-gobject \ python3-gstreamer1 \ gstreamer1-plugin-openh264 # RUN apt-get install -y \ # poppler-utils # Install raw image dependencies. # TODO # Install LDAP depedencies. RUN dnf -y install python3-ldap # Install OpenID dependencies. RUN dnf -y install python3-openid RUN groupadd www-data RUN groupadd --system mediagoblin --gid 1024 RUN adduser www-data -g www-data -G mediagoblin RUN mkdir /opt/mediagoblin RUN chown -R www-data:www-data /opt/mediagoblin WORKDIR /opt/mediagoblin RUN mkdir --mode=g+w /var/www RUN chown root:www-data /var/www USER www-data RUN git clone --depth=1 git://git.savannah.gnu.org/mediagoblin.git --branch master . RUN git show --oneline --no-patch RUN ./bootstrap.sh RUN ./configure RUN make RUN ./bin/python -m pip freeze RUN ./bin/python -m pytest -rs ./mediagoblin/tests --boxed RUN cd docs && make html RUN echo '[[mediagoblin.media_types.audio]]' >> mediagoblin.ini RUN echo '[[mediagoblin.media_types.video]]' >> mediagoblin.ini # RUN echo '[[mediagoblin.media_types.raw_image]]' >> mediagoblin.ini # RUN echo '[[mediagoblin.media_types.pdf]]' >> mediagoblin.ini # RUN echo '[[mediagoblin.plugins.indexedsearch]]' >> mediagoblin.ini # RUN echo 'USERS_ONLY = False' >> mediagoblin.ini # Fedora only RUN ./bin/pip install certifi RUN ./bin/gmg dbupdate RUN ./bin/gmg adduser --username admin --password a --email admin@example.com RUN ./bin/gmg makeadmin admin # Without the following we get "ModuleNotFoundError: No module named # 'paste.script'" when running ./lazyserver.sh. Not sure why as PasteScript is # in the setup.py requirements. Before this we have Paste==3.4.0; after we have # Paste==3.5.0. RUN ./bin/pip install PasteScript --force-reinstall EXPOSE 6543/tcp CMD ["./lazyserver.sh", "--server-name=broadcast"]