Skip to content

Commit

Permalink
chore: make podman UID mapping behave similarly to docker
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Nguyen <[email protected]>
  • Loading branch information
nathanwn committed Oct 19, 2023
1 parent c2bda95 commit 058e2bb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/release_scripts/run_macaron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,15 @@ if [[ -n ${MCN_DEBUG_ARGS:-} ]]; then
exit 0
fi

docker run \
--pull ${DOCKER_PULL} \
# By default
# - docker maps the host user $UID to a user with the same $UID in the container.
# - podman maps the host user $UID to the root user in the container.
# To make podman behave similarly to docker, we need to set the following env var.
# Reference: https://docs.podman.io/en/v4.4/markdown/options/userns.container.html.
export PODMAN_USERNS=keep-id

${DOCKER_EXEC} run \
--pull "${DOCKER_PULL}" \
--network=host \
--rm -i "${tty[@]}" \
-e "USER_UID=${USER_UID}" \
Expand Down

0 comments on commit 058e2bb

Please sign in to comment.