Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: run crun from container? #1024

Closed
lukasmrtvy opened this issue Oct 11, 2022 · 3 comments
Closed

Question: run crun from container? #1024

lukasmrtvy opened this issue Oct 11, 2022 · 3 comments

Comments

@lukasmrtvy
Copy link

lukasmrtvy commented Oct 11, 2022

I have a hypothetical question, is possible to run crun from the container ?
My use case would be to modify container resource contrains as Podman does not have an /update endpoint as docker has.
For example:

podman run --rm -it --privileged -v /run/crun:/hostfs/run/crun alpine sh -c 'apk add crun; crun --root  /hostfs/run/crun list'

shows containers, but in stopped state.
Thanks

EDIT:
Got it working..

podman run --rm -it --privileged --pid host -v /run/crun:/hostfs/run/crun  -v /sys/fs/cgroup:/sys/fs/cgroup alpine sh -c 'apk add crun; crun --root  /hostfs/run/crun list'
@giuseppe
Copy link
Member

hi @lukasmrtvy could you please provide more info on what you are trying to achieve and how you got it working?

FYI, new versions of Podman got a podman container update command to change cgroup resources of a running container.

@lukasmrtvy
Copy link
Author

lukasmrtvy commented Oct 11, 2022

@giuseppe hello, I need to change -cpu-quota and --cpu-period for a running container and that's not possible in current version ( 4.2.0 ) ATTOW, see containers/podman#5763 (comment)

Can You specify which version of Podman supports podman container update command / API endpoint ? Thanks

EDIT: Got it containers/podman@050f329 , nice

@giuseppe
Copy link
Member

4.3 will have it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants