Skip to content

Commit af6f85e

Browse files
committed
Add Podman options
1 parent 684d57f commit af6f85e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/spec-node/singleContainer.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ while sleep 1 & wait $!; do :; done`, '-']; // `wait $!` allows for the `trap` t
409409
...getLabels(labels),
410410
...containerEnv,
411411
...containerUserArgs,
412+
...getPodmanArgs(params),
412413
...(config.runArgs || []),
413414
...(await extraRunArgs(common, params, config) || []),
414415
...featureArgs,
@@ -433,6 +434,13 @@ while sleep 1 & wait $!; do :; done`, '-']; // `wait $!` allows for the `trap` t
433434
common.output.stop(text, start);
434435
}
435436

437+
function getPodmanArgs(params: DockerResolverParameters): string[] {
438+
if (params.isPodman && params.common.cliHost.platform === 'linux') {
439+
return ['--security-opt', 'label=disable', '--userns=keep-id'];
440+
}
441+
return [];
442+
}
443+
436444
function getLabels(labels: string[]): string[] {
437445
let result: string[] = [];
438446
labels.forEach(each => result.push('-l', each));

0 commit comments

Comments
 (0)