Repository navigation
|
Hi, We're thinking of getting rid of our Makefile and adopting your Python REST wrapper (since all the other scripts are in Python), but I could not find how the options ^above are represented in podman-py, can you point me the right direction please? |
Answered by
jwhonce
Jul 20, 2021
Replies: 1 comment
|
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 alpine_image = client.images.pull("quay.io/libpod/alpine", tag="latest")
container = client.containers.create(
alpine_image, command=["echo", "Hello, World"], env={"VAR1":"Value1"}
) |
0 replies
Answer selected by
jwhonce
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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