From 9de3063d8e62471fbfa381c5ad0c2a69232febde Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Sun, 28 Mar 2021 13:49:10 +1100 Subject: Add stub Dockerfile for Debian 11. --- Dockerfile-debian-10-sqlite | 194 +++++++++++++++++++++++++++++++++++++++ Dockerfile-debian-11-sqlite | 151 ++++++++++++++++++++++++++++++ Dockerfile-debian-python3-sqlite | 194 --------------------------------------- Dockerfile-fedora-33-sqlite | 111 ++++++++++++++++++++++ Dockerfile-fedora-python3-sqlite | 111 ---------------------- 5 files changed, 456 insertions(+), 305 deletions(-) create mode 100644 Dockerfile-debian-10-sqlite create mode 100644 Dockerfile-debian-11-sqlite delete mode 100644 Dockerfile-debian-python3-sqlite create mode 100644 Dockerfile-fedora-33-sqlite delete mode 100644 Dockerfile-fedora-python3-sqlite diff --git a/Dockerfile-debian-10-sqlite b/Dockerfile-debian-10-sqlite new file mode 100644 index 00000000..7899731f --- /dev/null +++ b/Dockerfile-debian-10-sqlite @@ -0,0 +1,194 @@ +# 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 +# +# Most development Docker images are built and run as root. That doesn't work +# here because the `bower` command run within the `make` step, refuses to run as +# root. +# +# To build this Docker image, run: +# +# docker build -t mediagoblin-python3 - < Dockerfile-debian-python3-sqlite +# +# The "- < Dockerfile" format advises Docker not to include the current +# directory as build context. Alternatively the following provides build +# context: +# +# docker build -t mediagoblin-python3 -f Dockerfile-debian-python3-sqlite . +# +# Before running the image you first need to first assign the "mediagoblin" and +# "user_dev" directories to an artificial group (1024) on the host that is +# mirrored within the image (details below): +# +# sudo chown --recursive :1024 mediagoblin user_dev +# find mediagoblin user_dev -type d -exec chmod 775 {} \; +# find mediagoblin user_dev -type f -exec chmod 664 {} \; +# +# Then you can run the image with the upstream MediaGoblin code: +# +# docker run --interactive --tty --publish 6543:6543 mediagoblin-python3 +# +# Or you can run with your local "mediagoblin" and "user_dev" directories +# bind-mounted into the container. This provides automatic code reloading and +# persistence: +# +# # TODO: Not working. +# docker run --interactive --tty --publish 6543:6543 --volume ./mediagoblin:/opt/mediagoblin/mediagoblin --volume ./extlib:/opt/mediagoblin/extlib mediagoblin-python3 +# +# Alternatively you use docker-compose instead of separate build/run steps: +# +# sudo chown --recursive :1024 mediagoblin user_dev +# find mediagoblin user_dev -type d -exec chmod 775 {} \; +# find mediagoblin user_dev -type f -exec chmod 664 {} \; +# docker-compose up --build +# +# You can run the test suite with: +# +# docker run --tty mediagoblin-python3 bash -c "bin/python -m pytest ./mediagoblin/tests --boxed" + + +FROM debian:buster + +# Install bootstrap and configure dependencies. Currently requires virtualenv +# rather than the more modern python3-venv (should be fixed). +RUN apt-get update && apt-get install -y \ +automake \ +git \ +nodejs \ +npm \ +python3-dev \ +virtualenv + +# Install make and runtime dependencies. +# +# Excluding python3-celery here due to conflict with dist-packges for a +# compatible version of billiard. +RUN apt-get install -y \ +python3-alembic \ +python3-jsonschema \ +python3-kombu \ +python3-lxml \ +python3-migrate \ +python3-py \ +python3-pytest \ +python3-pytest-xdist \ +python3-snowballstemmer \ +python3-sphinx \ +python3-sphinxcontrib.websupport \ +python3-webtest + +# Install audio dependencies. +RUN apt-get install -y \ +gstreamer1.0-libav \ +gstreamer1.0-plugins-bad \ +gstreamer1.0-plugins-base \ +gstreamer1.0-plugins-good \ +gstreamer1.0-plugins-ugly \ +python3-gst-1.0 \ +python3-numpy + +# Install video dependencies. +RUN apt-get install -y \ +gir1.2-gst-plugins-base-1.0 \ +gir1.2-gstreamer-1.0 \ +gstreamer1.0-tools \ +python3-gi + +# Install raw image dependencies. +# +# Currently (March 2021), python3-py3exiv2 is only available in Debian Sid, so +# we need to install py3exiv2 from PyPI (later on in this Dockerfile). These are +# the build depedencies for py3exiv2. +RUN apt-get install -y \ +libexiv2-dev \ +libboost-python-dev + +# Install document (PDF-only) dependencies. +# TODO: Check that PDF tests aren't skipped. +RUN apt-get install -y \ +poppler-utils + +# Install LDAP depedencies. +RUN apt-get install -y python3-ldap + +# Install OpenID dependencies. +RUN apt-get install -y python3-openid + +# Create working directory. +RUN mkdir /opt/mediagoblin +RUN chown -R www-data:www-data /opt/mediagoblin +WORKDIR /opt/mediagoblin + +# Create /var/www because Bower writes some cache files into /var/www during +# make, failing if it doesn't exist. +RUN mkdir --mode=g+w /var/www +RUN chown root:www-data /var/www + +# Set up custom group to align with volume permissions for mounted +# "mediagoblin/mediagoblin" and "mediagoblin/user_dev". +# +# The problem here is that the host's UID, GID and mode are used in the +# container, but of course the container's user www-data is running under a +# different UID/GID so can't read or write to the volume. It seems like there +# should be a better approach, but we'll align volume permissions between host +# and container as per +# https://medium.com/@nielssj/docker-volumes-and-file-system-permissions-772c1aee23ca +RUN groupadd --system mediagoblin --gid 1024 && adduser www-data mediagoblin + +USER www-data + +# Copy upstream MediaGoblin into the image for use in the build process. +# +# This build process is somewhat complicated, because of Bower/NPM, translations +# and Python dependencies, so it's not really feasible just to copy over a +# requirements.txt like many Python Dockerfiles examples do. We need the full +# source. +# +# While it is possible to copy the source from the current directory like this: +# +# COPY --chown=www-data:www-data . /opt/mediagoblin +# +# that approach to lots of confusing problems when your working directory has +# changed from the default - say you've enabled some plugins or switched +# database type. So instead we're doing a git clone. We could potentially use +# `git archive` but this still wouldn't account for the submodules. +# +# TODO: Figure out a docker-only way to do the build and run from our local +# version, so that local changes are immediately available to the running +# container. Not as easy as it sounds. We have this working with docker-compose, +# but still uses upstream MediaGoblin for the build. +RUN git clone --depth=1 git://git.savannah.gnu.org/mediagoblin.git --branch master . +# RUN git clone --depth=1 https://gitlab.com/BenSturmfels/mediagoblin.git --branch master . +RUN git show --oneline --no-patch + +RUN ./bootstrap.sh +RUN VIRTUALENV_FLAGS='--system-site-packages' ./configure +RUN make + +# Install raw image library from PyPI. +RUN ./bin/pip install py3exiv2 + +# Run the tests. +RUN ./bin/python -m pytest -rs ./mediagoblin/tests --boxed + +# Only safe if being run on a clean git checkout. Otherwise you may have already +# customised mediagoblin.ini to already install these. +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 + +# Prepare the SQLite database. +# +# TODO: Should probably be done at runtime. +RUN ./bin/gmg dbupdate +RUN ./bin/gmg adduser --username admin --password a --email admin@example.com +RUN ./bin/gmg makeadmin admin + +EXPOSE 6543/tcp + +# TODO: Is it possible to have a CMD here that is overriden by docker-compose? +CMD ["./lazyserver.sh", "--server-name=broadcast"] diff --git a/Dockerfile-debian-11-sqlite b/Dockerfile-debian-11-sqlite new file mode 100644 index 00000000..34f46a68 --- /dev/null +++ b/Dockerfile-debian-11-sqlite @@ -0,0 +1,151 @@ +# 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 debian:bullseye + +# Install bootstrap and configure dependencies. Currently requires virtualenv +# rather than the more modern python3-venv (should be fixed). +RUN apt-get update && apt-get install -y \ +automake \ +git \ +nodejs \ +npm \ +python3-dev \ +virtualenv + +# Install make and runtime dependencies. +# +# Excluding python3-celery here due to conflict with dist-packges for a +# compatible version of billiard. +RUN apt-get install -y \ +python3-alembic \ +python3-jsonschema \ +python3-kombu \ +python3-lxml \ +python3-migrate \ +python3-py \ +python3-pytest \ +python3-pytest-xdist \ +python3-snowballstemmer \ +python3-sphinx \ +python3-sphinxcontrib.websupport \ +python3-webtest + +# Install audio dependencies. +RUN apt-get install -y \ +gstreamer1.0-libav \ +gstreamer1.0-plugins-bad \ +gstreamer1.0-plugins-base \ +gstreamer1.0-plugins-good \ +gstreamer1.0-plugins-ugly \ +python3-gst-1.0 \ +python3-numpy + +# Install video dependencies. +RUN apt-get install -y \ +gir1.2-gst-plugins-base-1.0 \ +gir1.2-gstreamer-1.0 \ +gstreamer1.0-tools \ +python3-gi + +# Install raw image dependencies. +# +# Currently (March 2021), python3-py3exiv2 is only available in Debian Sid, so +# we need to install py3exiv2 from PyPI (later on in this Dockerfile). These are +# the build depedencies for py3exiv2. +RUN apt-get install -y \ +libexiv2-dev \ +libboost-python-dev + +# Install document (PDF-only) dependencies. +# TODO: Check that PDF tests aren't skipped. +RUN apt-get install -y \ +poppler-utils + +# Install LDAP depedencies. +RUN apt-get install -y python3-ldap + +# Install OpenID dependencies. +RUN apt-get install -y python3-openid + +# Create working directory. +RUN mkdir /opt/mediagoblin +RUN chown -R www-data:www-data /opt/mediagoblin +WORKDIR /opt/mediagoblin + +# Create /var/www because Bower writes some cache files into /var/www during +# make, failing if it doesn't exist. +RUN mkdir --mode=g+w /var/www +RUN chown root:www-data /var/www + +# Set up custom group to align with volume permissions for mounted +# "mediagoblin/mediagoblin" and "mediagoblin/user_dev". +# +# The problem here is that the host's UID, GID and mode are used in the +# container, but of course the container's user www-data is running under a +# different UID/GID so can't read or write to the volume. It seems like there +# should be a better approach, but we'll align volume permissions between host +# and container as per +# https://medium.com/@nielssj/docker-volumes-and-file-system-permissions-772c1aee23ca +RUN groupadd --system mediagoblin --gid 1024 && adduser www-data mediagoblin + +USER www-data + +# Copy upstream MediaGoblin into the image for use in the build process. +# +# This build process is somewhat complicated, because of Bower/NPM, translations +# and Python dependencies, so it's not really feasible just to copy over a +# requirements.txt like many Python Dockerfiles examples do. We need the full +# source. +# +# While it is possible to copy the source from the current directory like this: +# +# COPY --chown=www-data:www-data . /opt/mediagoblin +# +# that approach to lots of confusing problems when your working directory has +# changed from the default - say you've enabled some plugins or switched +# database type. So instead we're doing a git clone. We could potentially use +# `git archive` but this still wouldn't account for the submodules. +# +# TODO: Figure out a docker-only way to do the build and run from our local +# version, so that local changes are immediately available to the running +# container. Not as easy as it sounds. We have this working with docker-compose, +# but still uses upstream MediaGoblin for the build. +RUN git clone --depth=1 git://git.savannah.gnu.org/mediagoblin.git --branch master . +# RUN git clone --depth=1 https://gitlab.com/BenSturmfels/mediagoblin.git --branch master . +RUN git show --oneline --no-patch + +RUN ./bootstrap.sh +RUN VIRTUALENV_FLAGS='--system-site-packages' ./configure +RUN make + +# Install raw image library from PyPI. +RUN ./bin/pip install py3exiv2 + +# Run the tests. +# RUN ./bin/python -m pytest -rs ./mediagoblin/tests --boxed + +# Only safe if being run on a clean git checkout. Otherwise you may have already +# customised mediagoblin.ini to already install these. +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 + +# Prepare the SQLite database. +# +# TODO: Should probably be done at runtime. +RUN ./bin/gmg dbupdate +RUN ./bin/gmg adduser --username admin --password a --email admin@example.com +RUN ./bin/gmg makeadmin admin + +EXPOSE 6543/tcp + +# TODO: Is it possible to have a CMD here that is overriden by docker-compose? +CMD ["./lazyserver.sh", "--server-name=broadcast"] diff --git a/Dockerfile-debian-python3-sqlite b/Dockerfile-debian-python3-sqlite deleted file mode 100644 index 7899731f..00000000 --- a/Dockerfile-debian-python3-sqlite +++ /dev/null @@ -1,194 +0,0 @@ -# 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 -# -# Most development Docker images are built and run as root. That doesn't work -# here because the `bower` command run within the `make` step, refuses to run as -# root. -# -# To build this Docker image, run: -# -# docker build -t mediagoblin-python3 - < Dockerfile-debian-python3-sqlite -# -# The "- < Dockerfile" format advises Docker not to include the current -# directory as build context. Alternatively the following provides build -# context: -# -# docker build -t mediagoblin-python3 -f Dockerfile-debian-python3-sqlite . -# -# Before running the image you first need to first assign the "mediagoblin" and -# "user_dev" directories to an artificial group (1024) on the host that is -# mirrored within the image (details below): -# -# sudo chown --recursive :1024 mediagoblin user_dev -# find mediagoblin user_dev -type d -exec chmod 775 {} \; -# find mediagoblin user_dev -type f -exec chmod 664 {} \; -# -# Then you can run the image with the upstream MediaGoblin code: -# -# docker run --interactive --tty --publish 6543:6543 mediagoblin-python3 -# -# Or you can run with your local "mediagoblin" and "user_dev" directories -# bind-mounted into the container. This provides automatic code reloading and -# persistence: -# -# # TODO: Not working. -# docker run --interactive --tty --publish 6543:6543 --volume ./mediagoblin:/opt/mediagoblin/mediagoblin --volume ./extlib:/opt/mediagoblin/extlib mediagoblin-python3 -# -# Alternatively you use docker-compose instead of separate build/run steps: -# -# sudo chown --recursive :1024 mediagoblin user_dev -# find mediagoblin user_dev -type d -exec chmod 775 {} \; -# find mediagoblin user_dev -type f -exec chmod 664 {} \; -# docker-compose up --build -# -# You can run the test suite with: -# -# docker run --tty mediagoblin-python3 bash -c "bin/python -m pytest ./mediagoblin/tests --boxed" - - -FROM debian:buster - -# Install bootstrap and configure dependencies. Currently requires virtualenv -# rather than the more modern python3-venv (should be fixed). -RUN apt-get update && apt-get install -y \ -automake \ -git \ -nodejs \ -npm \ -python3-dev \ -virtualenv - -# Install make and runtime dependencies. -# -# Excluding python3-celery here due to conflict with dist-packges for a -# compatible version of billiard. -RUN apt-get install -y \ -python3-alembic \ -python3-jsonschema \ -python3-kombu \ -python3-lxml \ -python3-migrate \ -python3-py \ -python3-pytest \ -python3-pytest-xdist \ -python3-snowballstemmer \ -python3-sphinx \ -python3-sphinxcontrib.websupport \ -python3-webtest - -# Install audio dependencies. -RUN apt-get install -y \ -gstreamer1.0-libav \ -gstreamer1.0-plugins-bad \ -gstreamer1.0-plugins-base \ -gstreamer1.0-plugins-good \ -gstreamer1.0-plugins-ugly \ -python3-gst-1.0 \ -python3-numpy - -# Install video dependencies. -RUN apt-get install -y \ -gir1.2-gst-plugins-base-1.0 \ -gir1.2-gstreamer-1.0 \ -gstreamer1.0-tools \ -python3-gi - -# Install raw image dependencies. -# -# Currently (March 2021), python3-py3exiv2 is only available in Debian Sid, so -# we need to install py3exiv2 from PyPI (later on in this Dockerfile). These are -# the build depedencies for py3exiv2. -RUN apt-get install -y \ -libexiv2-dev \ -libboost-python-dev - -# Install document (PDF-only) dependencies. -# TODO: Check that PDF tests aren't skipped. -RUN apt-get install -y \ -poppler-utils - -# Install LDAP depedencies. -RUN apt-get install -y python3-ldap - -# Install OpenID dependencies. -RUN apt-get install -y python3-openid - -# Create working directory. -RUN mkdir /opt/mediagoblin -RUN chown -R www-data:www-data /opt/mediagoblin -WORKDIR /opt/mediagoblin - -# Create /var/www because Bower writes some cache files into /var/www during -# make, failing if it doesn't exist. -RUN mkdir --mode=g+w /var/www -RUN chown root:www-data /var/www - -# Set up custom group to align with volume permissions for mounted -# "mediagoblin/mediagoblin" and "mediagoblin/user_dev". -# -# The problem here is that the host's UID, GID and mode are used in the -# container, but of course the container's user www-data is running under a -# different UID/GID so can't read or write to the volume. It seems like there -# should be a better approach, but we'll align volume permissions between host -# and container as per -# https://medium.com/@nielssj/docker-volumes-and-file-system-permissions-772c1aee23ca -RUN groupadd --system mediagoblin --gid 1024 && adduser www-data mediagoblin - -USER www-data - -# Copy upstream MediaGoblin into the image for use in the build process. -# -# This build process is somewhat complicated, because of Bower/NPM, translations -# and Python dependencies, so it's not really feasible just to copy over a -# requirements.txt like many Python Dockerfiles examples do. We need the full -# source. -# -# While it is possible to copy the source from the current directory like this: -# -# COPY --chown=www-data:www-data . /opt/mediagoblin -# -# that approach to lots of confusing problems when your working directory has -# changed from the default - say you've enabled some plugins or switched -# database type. So instead we're doing a git clone. We could potentially use -# `git archive` but this still wouldn't account for the submodules. -# -# TODO: Figure out a docker-only way to do the build and run from our local -# version, so that local changes are immediately available to the running -# container. Not as easy as it sounds. We have this working with docker-compose, -# but still uses upstream MediaGoblin for the build. -RUN git clone --depth=1 git://git.savannah.gnu.org/mediagoblin.git --branch master . -# RUN git clone --depth=1 https://gitlab.com/BenSturmfels/mediagoblin.git --branch master . -RUN git show --oneline --no-patch - -RUN ./bootstrap.sh -RUN VIRTUALENV_FLAGS='--system-site-packages' ./configure -RUN make - -# Install raw image library from PyPI. -RUN ./bin/pip install py3exiv2 - -# Run the tests. -RUN ./bin/python -m pytest -rs ./mediagoblin/tests --boxed - -# Only safe if being run on a clean git checkout. Otherwise you may have already -# customised mediagoblin.ini to already install these. -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 - -# Prepare the SQLite database. -# -# TODO: Should probably be done at runtime. -RUN ./bin/gmg dbupdate -RUN ./bin/gmg adduser --username admin --password a --email admin@example.com -RUN ./bin/gmg makeadmin admin - -EXPOSE 6543/tcp - -# TODO: Is it possible to have a CMD here that is overriden by docker-compose? -CMD ["./lazyserver.sh", "--server-name=broadcast"] diff --git a/Dockerfile-fedora-33-sqlite b/Dockerfile-fedora-33-sqlite new file mode 100644 index 00000000..c45bb7f5 --- /dev/null +++ b/Dockerfile-fedora-33-sqlite @@ -0,0 +1,111 @@ +# 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 \ +nodejs \ +npm \ +python3-devel \ +virtualenv + +RUN dnf -y install \ +findutils \ +python3-alembic \ +python3-celery \ +python3-jsonschema \ +python3-kombu \ +python3-lxml \ +python3-migrate \ +# Fedora only +python3-pillow \ +python3-py \ +python3-pytest \ +python3-pytest-xdist \ +python3-snowballstemmer \ +python3-sphinx \ +# Not in Fedora +# python3-sphinxcontrib.websupport \ +python3-webtest \ +# Fedora only +which \ +# To build waitress on Fedora 33 (not required for 31) +libffi-devel + +RUN dnf -y install \ +gstreamer1-plugins-base \ +gstreamer1-plugins-bad-free \ +gstreamer1-plugins-good \ +gstreamer1-plugins-ugly-free \ +python3-numpy + +RUN dnf search gst + +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 VIRTUALENV_FLAGS='--system-site-packages' ./configure +RUN make + +RUN ./bin/python -m pytest -rs ./mediagoblin/tests --boxed + +RUN echo '[[mediagoblin.media_types.audio]]' >> mediagoblin.ini +RUN echo '[[mediagoblin.media_types.video]]' >> 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"] diff --git a/Dockerfile-fedora-python3-sqlite b/Dockerfile-fedora-python3-sqlite deleted file mode 100644 index 3c471c07..00000000 --- a/Dockerfile-fedora-python3-sqlite +++ /dev/null @@ -1,111 +0,0 @@ -# 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-python3-sqlite for details. - -FROM fedora:33 - -RUN dnf -y install \ -automake \ -gcc \ -git-core \ -make \ -nodejs \ -npm \ -python3-devel \ -virtualenv - -RUN dnf -y install \ -findutils \ -python3-alembic \ -python3-celery \ -python3-jsonschema \ -python3-kombu \ -python3-lxml \ -python3-migrate \ -# Fedora only -python3-pillow \ -python3-py \ -python3-pytest \ -python3-pytest-xdist \ -python3-snowballstemmer \ -python3-sphinx \ -# Not in Fedora -# python3-sphinxcontrib.websupport \ -python3-webtest \ -# Fedora only -which \ -# To build waitress on Fedora 33 (not required for 31) -libffi-devel - -RUN dnf -y install \ -gstreamer1-plugins-base \ -gstreamer1-plugins-bad-free \ -gstreamer1-plugins-good \ -gstreamer1-plugins-ugly-free \ -python3-numpy - -RUN dnf search gst - -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 VIRTUALENV_FLAGS='--system-site-packages' ./configure -RUN make - -RUN ./bin/python -m pytest -rs ./mediagoblin/tests --boxed - -RUN echo '[[mediagoblin.media_types.audio]]' >> mediagoblin.ini -RUN echo '[[mediagoblin.media_types.video]]' >> 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"] -- cgit v1.2.3