Skip to content

Commit

Permalink
Specify the user in the docker run command using --user option
Browse files Browse the repository at this point in the history
- This is done in order to ensure that it is the same current user inside the container too.
- The user will be the owner of the Docker container process.
- Using the –user option will override the user specified in Dockerfile.
  • Loading branch information
iathmika committed Apr 21, 2022
1 parent 7df1c71 commit 0e7bb29
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bin/docker-execute
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ CODE_DIR="/home/dependabot/dependabot-core"

touch .core-bash_history
docker run --privileged=true -dit \
--user $(id -u) \
-v "$(pwd)/.core-bash_history:/home/dependabot/.bash_history" \
-v "$(pwd)/.rubocop.yml:$CODE_DIR/.rubocop.yml" \
-v "$(pwd)/bin:$CODE_DIR/bin" \
Expand Down

0 comments on commit 0e7bb29

Please sign in to comment.