diff --git a/common/.commonfiles.sha b/common/.commonfiles.sha index 4821071bc8..3a167d7757 100644 --- a/common/.commonfiles.sha +++ b/common/.commonfiles.sha @@ -1 +1 @@ -8f0a8a3d3dd0de33b19c37b4558e7609e9756223 +cf5c3e3ef431a5946fd598954e8dbf1baf958228 diff --git a/common/scripts/run.sh b/common/scripts/run.sh index dc51962890..4a2ebc94c6 100755 --- a/common/scripts/run.sh +++ b/common/scripts/run.sh @@ -37,6 +37,7 @@ MOUNT_DEST="${MOUNT_DEST:-/work}" read -ra DOCKER_RUN_OPTIONS <<< "${DOCKER_RUN_OPTIONS:-}" [[ -t 1 ]] && DOCKER_RUN_OPTIONS+=("-it") +[[ ${UID} -ne 0 ]] && DOCKER_RUN_OPTIONS+=(-u "${UID}:${DOCKER_GID}") # $CONTAINER_OPTIONS becomes an empty arg when quoted, so SC2086 is disabled for the # following command only @@ -44,7 +45,6 @@ read -ra DOCKER_RUN_OPTIONS <<< "${DOCKER_RUN_OPTIONS:-}" "${CONTAINER_CLI}" run \ --rm \ "${DOCKER_RUN_OPTIONS[@]}" \ - -u "${UID}:${DOCKER_GID}" \ --init \ --sig-proxy=true \ ${DOCKER_SOCKET_MOUNT:--v /var/run/docker.sock:/var/run/docker.sock} \