Skip to content

Commit

Permalink
tests/docker: Use --userns=keep-id for podman
Browse files Browse the repository at this point in the history
The workaround that attempts to accomplish the same result as --userns=keep-id
does not appear to work well with UIDs much above 1000 (like mine, which is
above 20000.)

Since we have official support for this "trick" now, use the supported method.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20190904232451.26466-1-jsnow@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
  • Loading branch information
jnsnow authored and stsquad committed Sep 10, 2019
1 parent 8480517 commit 63772d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/docker/docker.py
Expand Up @@ -369,9 +369,7 @@ def run(self, args, argv):
argv = [ "-u", str(uid) ] + argv
docker = Docker()
if docker._command[0] == "podman":
argv = [ "--uidmap", "%d:0:1" % uid,
"--uidmap", "0:1:%d" % uid,
"--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + argv
argv.insert(0, '--userns=keep-id')
return Docker().run(argv, args.keep, quiet=args.quiet)


Expand Down

0 comments on commit 63772d5

Please sign in to comment.