Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
update uid gid setting when running docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
swangcs committed Aug 11, 2020
1 parent c5d0277 commit 3700450
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docker-cmd-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ if [[ "$RUN" = true ]]; then
else
DETACH=""
fi
CURR_UID=$(id -u)
CURR_GID=$(id -g)
CURR_UID=$USER_ID
CURR_GID=$GROUP_ID
RUN_OPT="-u $CURR_UID:$CURR_GID --net=host --env DISPLAY=$DISPLAY \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--privileged $MOUNT_DEVEL $MOUNT_LEARN \
Expand Down
2 changes: 1 addition & 1 deletion docs/howto-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Basic command to use:

## Step 2: Run a container of the built image

`sudo bash docker-cmd-mac.sh --image-name={your_image_name} --run --no-gpu`
`sudo bash docker-cmd-mac.sh --image-name={your_image_name} --run --no-gpu --uid=502 --gid=222`

> :warning: **Using SUDO for docker is not a good practice**: Due to a problem of user privilege between host and container, `sudo` has to be used here to make it work. Feel free to let us know if you have any idea to solve this security issue.
Expand Down

0 comments on commit 3700450

Please sign in to comment.