Skip to content

Commit 5607dd6

Browse files
chore: fix docker compose files for macos
1 parent 16d23ea commit 5607dd6

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

docker-compose-pg.yml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ services:
99
- POSTGRES_USER=patchwork
1010
- POSTGRES_PASSWORD=password
1111
web:
12+
platform: linux/amd64
1213
build:
1314
context: .
1415
dockerfile: ./tools/docker/Dockerfile

docker-compose.yml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ services:
1414
# https://stackoverflow.com/a/55706057
1515
- SYS_NICE # CAP_SYS_NICE
1616
web:
17+
platform: linux/amd64
1718
build:
1819
context: .
1920
dockerfile: ./tools/docker/Dockerfile

docs/development/installation.rst

+10
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ configure Patchwork using Docker:
3030
package.
3131
__ post-install_
3232

33+
.. note::
34+
35+
Mac users might need to enable Rosetta emulation in the docker engine.
36+
3337
#. (Optional) Create a ``.env`` file in the root directory of the project and
3438
store your ``UID`` and ``GID`` attribute there.
3539

@@ -44,6 +48,12 @@ configure Patchwork using Docker:
4448

4549
__ https://github.com/docker/compose/issues/2380
4650

51+
.. note::
52+
53+
For MacOS users the `staff` default GID might conflict with already
54+
existing GID in the docker image, that why the non-unique GID option is
55+
used in the Dockerfiles
56+
4757
#. Build the images. This will download over 200MB from the internet:
4858

4959
.. code-block:: shell

tools/docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ENV PYTHONUNBUFFERED 1
99
ENV PROJECT_HOME /home/patchwork/patchwork
1010
ENV DJANGO_SETTINGS_MODULE patchwork.settings.dev
1111

12-
RUN groupadd --gid=$GID patchwork && \
12+
RUN groupadd -o --gid=$GID patchwork && \
1313
useradd --uid=$UID --gid=$GID --create-home patchwork
1414
RUN rm -f /etc/localtime; ln -s /usr/share/zoneinfo/$TZ /etc/localtime
1515

0 commit comments

Comments
 (0)