Skip to content
Discussion options

You must be logged in to vote

For container create() these options are given as python keyword arguments. The keywords used are the same as docker-py to ease moving scripts between the libraries.

For example:

env => environment
ulimit => ulimits
cap-add => cap_add
gidmap => group_add
uidmap => user

alpine_image = client.images.pull("quay.io/libpod/alpine", tag="latest")
container = client.containers.create(
  alpine_image, command=["echo", "Hello, World"], env={"VAR1":"Value1"}
)

Replies: 1 comment

Comment options

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