Skip to content

Commit

Permalink
Use fixed UID/GID for Git Bash
Browse files Browse the repository at this point in the history
  • Loading branch information
sichapman authored May 8, 2024
1 parent 0ee099a commit cd85917
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/docker_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ export COMPOSE_PROJECT_NAME=dv

# Set environment variables for compose files to send to Dockerfiles as arguments,
# should the Dockerfile wish to create a matching user to run the container as
export OUTSIDE_UID=$(id -u)
export OUTSIDE_GID=$(id -g)
# However Git Bash does not care about file system permissions, and uses weirdly high UIDs, so
# just use 1000 in that case
if [[ "$OSTYPE" == "msys"* || "$OSTYPE" == "win"* || "$OSTYPE" == "cygwin"* ]] ; then
export OUTSIDE_UID=1000
export OUTSIDE_GID=1000
else
export OUTSIDE_UID=$(id -u)
export OUTSIDE_GID=$(id -g)
fi

# Load all the docker compose file references that were saved earlier
dockerfilelist=$(<./.docker-compose-file-list)
Expand Down

0 comments on commit cd85917

Please sign in to comment.