Skip to content

Commit

Permalink
Dockerization: Add platform and change user uid (#275)
Browse files Browse the repository at this point in the history
Specify platform as "linux/amd64" for the app container in the
docker-compose.yml, because that's what it's supposed to be and it won't
even work on e.g. ARM based archs. (Some deps won't compile.)

Change the appuser uid to 1000, since that is very often the same uid as
the developer's uid on a Linux host, which could avoid some problems
when the source tree is mounted as a volume to the container and still
being modified from the host.
  • Loading branch information
suutari-ai authored Nov 24, 2023
2 parents fe8df51 + d0cef4e commit 1cefe0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN pip install -r requirements.txt

WORKDIR /app

RUN adduser -u 5678 --disabled-password --gecos "" appuser
RUN adduser -u 1000 --disabled-password --gecos "" appuser

ENTRYPOINT ["./docker-entrypoint"]

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
volumes:
- db_data:/var/lib/postgresql/data
app:
platform: "linux/amd64"
image: parkkihubi
build:
context: "."
Expand Down

0 comments on commit 1cefe0a

Please sign in to comment.