$ git clone https://github.com/getpatchwork/patchwork.git
-3. Create a ``.env`` file in the root directory of the project and store your
- ``UID`` and ``GID`` attributes there::
+3. (Optional) Create a ``.env`` file in the root directory of the project and
+ store your ``UID`` and ``GID`` attributes there::
$ cd patchwork && printf "UID=$(id -u)\nGID=$(id -g)\n" > .env
+ This should only be necessary if you have a ``UID`` or ``GID`` other than
+ ``1000``.
+
4. Build the images. This will download a number of packages from the internet,
and compile several versions of Python::
package.
__ post-install_
-#. Create a ``.env`` file in the root directory of the project and store your
- ``UID`` and ``GID`` attribute there.
+#. (Optional) Create a ``.env`` file in the root directory of the project and
+ store your ``UID`` and ``GID`` attribute there.
.. code-block:: shell
$ echo "UID=$UID" > .env
$ echo "GID=`id -g`" >> .env
+ This should only be necessary if you have a ``UID`` or ``GID`` other than
+ ``1000``. For more information on why this is necessary, refer to this
+ `docker-compose issue`__.
+
+ __ https://github.com/docker/compose/issues/2380
+
#. Build the images. This will download over 200MB from the internet:
.. code-block:: shell
__ post-install_
-.. note::
-
- If you see an error like the below::
-
- You must define UID in .env
-
- Ensure you have created a ``.env`` file in the root of your project
- directory and stored the ``UID`` attribute there. For more information on
- why this is necessary, refer to this `docker-compose issue`__.
-
- __ https://github.com/docker/compose/issues/2380
-
.. _docker: https://docs.docker.com/engine/install/
.. _docker-compose: https://docs.docker.com/compose/install/
.. _post-install: https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
FROM ghcr.io/getpatchwork/pyenv:latest
-ARG UID
-ARG GID
-
-# make sure the user has configured the '.env' file and quick fail if not
-
-RUN echo $UID; echo $GID; \
- [ -n "$UID" ] || { echo "You must define UID in .env" 1>&2; exit 1; }; \
- [ -n "$GID" ] || { echo "You must define GID in .env" 1>&2; exit 1; }
+ARG UID=1000
+ARG GID=1000
ARG TZ="Australia/Canberra"
ENV DEBIAN_FRONTEND noninteractive