Skip to content

Commit

Permalink
docker: fix UID/GID on Linux
Browse files Browse the repository at this point in the history
docker-compose.yml` used the special variabled `UID` and `GROUPS`, but
it seems impossible to get `GROUPS` to be exported. Therefore, I switched
to using non-special env variables, but set those explicitly in `sirf-compose`.
  • Loading branch information
KrisThielemans committed May 21, 2021
1 parent a24544f commit 04e3822
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:
environment:
# mainUser: ${USER:-sirfuser}
mainUser: sirfuser
GROUP_ID: ${GROUPS:-1000}
USER_ID: ${UID:-1000}
GROUP_ID: ${GROUP_ID:-1000}
USER_ID: ${USER_ID:-1000}
build:
context: .
target: sirf
Expand Down
2 changes: 2 additions & 0 deletions docker/sirf-compose
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash
cd "$(dirname $0)"
export GROUP_ID=$(id -g)
export USER_ID=$(id -u)
docker-compose -f docker-compose.yml -f docker-compose.nix.yml "$@"

0 comments on commit 04e3822

Please sign in to comment.