Skip to content

Commit

Permalink
Echo docker version and run container as root
Browse files Browse the repository at this point in the history
- Container was previously run as jenkins user.
  • Loading branch information
iathmika committed May 12, 2022
1 parent d03a5ad commit f4b648e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/docker-execute
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ echo "package: $2"
echo "Image: $IMAGE_NAME"
echo "UID: $(id -u)"
echo "GID: $(id -g)"
echo "$(docker --version)"

# Enable docker buildkit with inline cache builds
export DOCKER_BUILDKIT=1
Expand Down Expand Up @@ -110,7 +111,7 @@ export DOCKER_GID=$(id -g)

touch .core-bash_history
docker run -dit --rm \
--user "$(id -u):$(id -g)" \
--user 0 \
-v "/etc/group:/etc/group:ro" \
-v "/etc/passwd:/etc/passwd:ro" \
-v "/etc/shadow:/etc/shadow:ro" \
Expand Down

0 comments on commit f4b648e

Please sign in to comment.