Replies: 1 comment 1 reply
-
have you explored https://github.com/containers/podman-py ? that might also be a good place to transfer this conversation |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
my goal is to create a simple python function that can write any text to file in podman container
like this:
in podman api docs i foud two methods:
fist one requires tar archive to be created, and i found it too overcomplicated, so i think i should use second one
i wrote a helper function that will execute commands
here is a simplest solution i found for file creating
it can be broken easily, for example it can't write greater-than sign
a bit better solution
it can write greater-than sign, but brokes if writing 'EOF'
i need an unbrearkable way to write anyting, and i should avoid using bash, so i wrote this unbrerakable code with subprocess lib
this code requres content to be passed to
input
argumentbut unforcunately, i can't get working code that does same thing with podman api
can anybody write working code example for me?
i use fedora 41 and podman 5.3.2
Beta Was this translation helpful? Give feedback.
All reactions