File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1817,6 +1817,14 @@ class Build {
18171817 } else {
18181818 dockerImageDigest = dockerImageDigest. replaceAll(" \\ [" , " " ). replaceAll(" \\ ]" , " " )
18191819 String dockerRunArg= " -e \" BUILDIMAGESHA=$dockerImageDigest \" "
1820+
1821+ // Are we running podman in Docker CLI Emulation mode?
1822+ def isPodman = context. sh(script : " docker --version | grep podman" , returnStatus :true )
1823+ if (isPodman == 0 ) {
1824+ // Note: --userns was introduced in podman 4.3.0
1825+ // Add uid and gid userns mapping required for podman
1826+ dockerRunArg + = " --userns keep-id:uid=1000,gid=1000"
1827+ }
18201828 context. docker. image(buildConfig. DOCKER_IMAGE ). inside(buildConfig. DOCKER_ARGS + " " + dockerRunArg) {
18211829 buildScripts(
18221830 cleanWorkspace,
You can’t perform that action at this time.
0 commit comments