@@ -1641,9 +1641,9 @@ However running cron in a container is problematic (running
16411641busybox crond as root vs. non-root, requiring setgrp privs
16421642etc). Patches for implementing email support are welcome.
16431643
1644- If you want to use a MySQL backend, the `docker -compose.yml` file will
1645- deploy a Roundup container and a MySQL container backend for use with
1646- Roundup.
1644+ If you want to use a MySQL backend, see `Docker -compose
1645+ Deployment`_ to deploy a Roundup container and a MySQL container
1646+ backend for use with Roundup.
16471647
16481648We recommend you follow the `OSWAP Docker Security practices`_ for your
16491649production Roundup instance.
@@ -1654,24 +1654,65 @@ production Roundup instance.
16541654Building a Docker Container
16551655---------------------------
16561656
1657- To build a docker container using the code in the current directory,
1658- run this build command from the top of the source tree::
1657+ You can build a docker container in one of 4 modes defined by the
1658+ ``source`` build-arg.
1659+
1660+ ``--build-arg="source=local"``
1661+ the default if no source is defined. Build using the version in
1662+ the source tree by running ``setup.py install``.
1663+
1664+ ``--build-arg="source=pypi"``
1665+ build the newest production release version deployed to pypi.
1666+ If you want to build using a pre-release, you can append
1667+ `pip version specifiers
1668+ <https://peps.python.org/pep-0440/#version-specifiers>`_ to
1669+ `pypi` without embedding any spaces. For example::
1670+
1671+ # install 2.2.0 if available or 2.2.0b1 or 2.2.0b2 etc.
1672+ --build-arg="source=pypi~=2.2.0b1"
1673+
1674+ # install only a 2.2.0 beta
1675+ --build-arg="source=pypi~=2.2.0b1,!=2.2.0"
1676+
1677+ Note that versions of Roundup before 2.2 may not run correctly
1678+ in a Docker container.
1679+
1680+ ``--build-arg="source=pip_local"``
1681+ Build using the version in the source tree by running ``pip
1682+ install``. This places some files (e.g. man pages, templates) in
1683+ different directories from the `local` install but is preferred
1684+ by some Python users.
1685+
1686+ ``--build-arg="source=pip_sdist"``
1687+ This is meant for maintainer/developer use. It installs using
1688+ pip from a source distribution (sdist) tarball built by
1689+ following the RELEASE.txt. It is meant for testing
1690+ releases. Normal users/admins should not use it.
1691+
1692+ Build a docker container using the code in the current directory,
1693+ with this build command from the top of the source tree::
16591694
16601695 docker build -t roundup-app -f scripts/Docker/Dockerfile .
16611696
1662- You can also build a container using the newest Roundup release on
1663- PyPI, by running::
1697+ Build a container using the newest production (non pre-release)
1698+ Roundup release on PyPI, by running::
16641699
16651700 docker build -t roundup-app --build-arg="source=pypi" \
16661701 -f scripts/Docker/Dockerfile .
16671702
1668- The docker declares a single volume mounted at
1669- ``/usr/src/app/tracker`` inside the container. You will mount your
1670- tracker home directory at this location. The ``/usr/src/app`` path can
1671- be changed by using ``--build-arg="appdir=/new/path"``.
1703+ Change the ``build-arg`` for building in other modes.
1704+
1705+ The Dockerfile declares a single volume mounted at
1706+ ``/usr/src/app/tracker`` inside the container. You will mount
1707+ your tracker home directory at this location. The
1708+ ``/usr/src/app`` path can be changed by adding::
1709+
1710+ --build-arg="appdir=/new/path"
1711+
1712+ You can also add additional modules to the docker container by
1713+ using::
16721714
1673- You can also add additional modules to the docker container by using
1674- `--build-arg="pip_mod=requests setproctitle"`.
1715+ --build-arg="pip_mod=requests setproctitle"
16751716
16761717Because of deficiencies in the docker program (see:
16771718https://github.com/moby/moby/issues/29110#issuecomment-1100676306),
@@ -1683,7 +1724,8 @@ suggested ``--build-arg`` to the ``docker build`` command line.
16831724.. _UID at image build time:
16841725
16851726By default the container runs Roundup using UID 1000. By setting
1686- `--build-arg="roundup_uid=2000"` you can change the UID.
1727+ ``--build-arg="roundup_uid=2000"`` you can change the UID and
1728+ GID.
16871729
16881730Configuring Roundup in the Container
16891731------------------------------------
@@ -1885,9 +1927,10 @@ Tags for Dockerhub Docker Images
18851927--------------------------------
18861928
18871929The docker images available from
1888- https://hub.docker.com/r/rounduptracker/roundup
1889- are tagged with: version-build, version, and ``latest`` tags.
1890- For example, the tags when 2.3.0 is released will be:
1930+ https://hub.docker.com/r/rounduptracker/roundup are tagged with:
1931+ version-build, version, and ``latest`` tags. Only production
1932+ releases (not pre-releases) are tagged this way. For example, the
1933+ tags when 2.3.0 is released will be:
18911934
18921935``rounduptracker/roundup:latest``
18931936 is a moving tag that tracks the latest build
@@ -1910,11 +1953,12 @@ For example, the tags when 2.3.0 is released will be:
19101953
19111954In addition to the release tags, there may be one or more
19121955development tags available. All tags will start with `devel`. For
1913- example: ``rounduptracker/roundup:devel``.
1956+ example: ``rounduptracker/roundup:2.3.0b1-devel``,
1957+ ``rounduptracker/roundup:devel``
19141958
1915- You should not assume that any ``devel`` tag is static. They ae
1959+ You should not assume that any ``devel`` tag is static. They are
19161960mainly for use by Roundup developer/maintainer for testing. There
1917- may be alternate tags starting with ``devel- `` to indicate builds
1961+ may be alternate tags ending with ``-devel `` to indicate builds
19181962from specific Mercurial versions/hashes. Also the tag may be
19191963overwritten to change the underlying Python libraries or
19201964images. Unless you like the bleeding edge, these should not be
0 commit comments