From 6372c977ea0e6206d137e734a981ca0bb3435e12 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 16 Jul 2018 10:10:20 +0200 Subject: rootless: require subids to be present Most images won't work without multiple ids/gids. Error out immediately if there are no multiple ids available. The error code when the user is not present in /etc/sub{g,u}id looks like: $ bin/podman run --rm -ti alpine echo hello ERRO[0000] No subuid ranges found for user "gscrivano" Closes: https://github.com/projectatomic/libpod/issues/1087 Signed-off-by: Giuseppe Scrivano Closes: #1097 Approved by: rhatdan --- test/e2e/rootless_test.go | 1 + 1 file changed, 1 insertion(+) (limited to 'test/e2e') diff --git a/test/e2e/rootless_test.go b/test/e2e/rootless_test.go index d628b6fa1..918faa320 100644 --- a/test/e2e/rootless_test.go +++ b/test/e2e/rootless_test.go @@ -82,6 +82,7 @@ var _ = Describe("Podman rootless", func() { env := os.Environ() env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir)) env = append(env, fmt.Sprintf("HOME=%s", home)) + env = append(env, "PODMAN_ALLOW_SINGLE_ID_MAPPING_IN_USERNS=1") cmd := podmanTest.PodmanAsUser([]string{"run", "--rootfs", mountPath, "echo", "hello"}, 1000, 1000, env) cmd.WaitWithDefaultTimeout() Expect(cmd.LineInOutputContains("hello")).To(BeTrue()) -- cgit v1.2.3-54-g00ecf