Skip to content

Commit 0e8b784

Browse files
committed
cmd/remote-session: use --init instead of dumb-init
I'd like to reuse the `cosa remote-session` bits to run non-cosa images on remote builders. Since it's mostly a wrapper around `podman --remote`, it has very few requirements on the target image. One of the requirements I'd like to loosen is on `dumb-init`. That one is easy to drop since podman has built-in support for making pid 1 an init-like system. Use that instead. We still need to override the entrypoint though so that we can run sleep instead of cosa.
1 parent 87fc693 commit 0e8b784

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/remote-session.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,9 @@ func runCreate(c *cobra.Command, args []string) error {
144144
"--volume=secex-data:/data.secex:ro",
145145
"--uidmap=1000:0:1", "--uidmap=0:1:1000", "--uidmap=1001:1001:64536",
146146
"--device=/dev/kvm", "--device=/dev/fuse", "--tmpfs=/tmp",
147-
"--entrypoint=/usr/bin/dumb-init", remoteSessionOpts.CreateImage,
148-
"sleep", remoteSessionOpts.CreateExpiration}
147+
"--init", "--entrypoint=/usr/bin/sleep",
148+
remoteSessionOpts.CreateImage,
149+
remoteSessionOpts.CreateExpiration}
149150
cmd := exec.Command("podman", podmanargs...)
150151
cmd.Stdout = os.Stdout
151152
cmd.Stderr = os.Stderr

0 commit comments

Comments
 (0)