Skip to content

Commit 186ff77

Browse files
authored
Merge branch 'containers:main' into main
2 parents e2f6d02 + 0125ec1 commit 186ff77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/bootc/bootc_disk.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ func (p *BootcDisk) createInstallContainer(config DiskImageConfig) *exec.Cmd {
305305
// Basic config:
306306
// - force on --remote because we depend on podman machine.
307307
// - add privileged, pid=host, SELinux config and bind mounts per https://containers.github.io/bootc/bootc-install.html
308-
podmanArgs := []string{"--remote", "run", "--rm", "-i", "--pid=host", "--privileged", "--security-opt=label=type:unconfined_t", "--volume=/dev:/dev", "--volume=/var/lib/containers:/var/lib/containers"}
308+
// - we need force running as root (i.e., --user=root:root) to overwrite any possible USER directive in the Containerfile
309+
podmanArgs := []string{"--remote", "run", "--rm", "-i", "--pid=host", "--user=root:root", "--privileged", "--security-opt=label=type:unconfined_t", "--volume=/dev:/dev", "--volume=/var/lib/containers:/var/lib/containers"}
309310
// Custom bind mounts
310311
podmanArgs = append(podmanArgs, fmt.Sprintf("--volume=%s:/output", p.Directory))
311312
if term.IsTerminal(int(os.Stdin.Fd())) {

0 commit comments

Comments
 (0)