@@ -1641,9 +1641,9 @@ However running cron in a container is problematic (running
1641
1641
busybox crond as root vs. non-root, requiring setgrp privs
1642
1642
etc). Patches for implementing email support are welcome.
1643
1643
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.
1647
1647
1648
1648
We recommend you follow the `OSWAP Docker Security practices`_ for your
1649
1649
production Roundup instance.
@@ -1654,24 +1654,65 @@ production Roundup instance.
1654
1654
Building a Docker Container
1655
1655
---------------------------
1656
1656
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::
1659
1694
1660
1695
docker build -t roundup-app -f scripts/Docker/Dockerfile .
1661
1696
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::
1664
1699
1665
1700
docker build -t roundup-app --build-arg="source=pypi" \
1666
1701
-f scripts/Docker/Dockerfile .
1667
1702
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::
1672
1714
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"
1675
1716
1676
1717
Because of deficiencies in the docker program (see:
1677
1718
https://github.com/moby/moby/issues/29110#issuecomment-1100676306),
@@ -1683,7 +1724,8 @@ suggested ``--build-arg`` to the ``docker build`` command line.
1683
1724
.. _UID at image build time:
1684
1725
1685
1726
By 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.
1687
1729
1688
1730
Configuring Roundup in the Container
1689
1731
------------------------------------
@@ -1885,9 +1927,10 @@ Tags for Dockerhub Docker Images
1885
1927
--------------------------------
1886
1928
1887
1929
The 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:
1891
1934
1892
1935
``rounduptracker/roundup:latest``
1893
1936
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:
1910
1953
1911
1954
In addition to the release tags, there may be one or more
1912
1955
development 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``
1914
1958
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
1916
1960
mainly 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
1918
1962
from specific Mercurial versions/hashes. Also the tag may be
1919
1963
overwritten to change the underlying Python libraries or
1920
1964
images. Unless you like the bleeding edge, these should not be
0 commit comments