Skip to content

How to use userns=auto in API POST? #15278

Answered by giuseppe
lukasmrtvy asked this question in Q&A
Discussion options

You must be logged in to vote

you'd need to specify something like the following:

curl -s --unix-socket /run/user/1000/podman/podman.sock -X POST -H "Content-Type: application/json" -d '{"Image":"alpine","idMappings": {"UIDMap": [{"container_id": 0, "host_id": 10000, "size": 100}], "GIDMap": [{"container_id": 0, "host_id": 10000, "size": 100}]}, "userns":{"nsmode":"private"},"entrypoint":["/bin/sh","-c"],"command":["cat /proc/self/uid_map"]}' http://d/v4.1.1/libpod/containers/create

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by flouthoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants