diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 44a8323..cf0f2d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,12 +62,10 @@ def compose_up(compose, args): images List images kill Kill containers logs View output from containers - pause Pause services port Print the public port for a port binding ps List containers rm Remove stopped containers run Run a one-off command scale Set number of containers for a service top Display the running processes - unpause Unpause services ``` diff --git a/podman_compose.py b/podman_compose.py index fe92165..baf96fe 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -2344,6 +2344,18 @@ def compose_port(compose, args): print(published) return +@cmd_run(podman_compose, 'pause', 'Pause all running containers') +def compose_pause(compose, args): + containers = list(reversed(compose.containers)) + for container in containers: + compose.podman.run(['pause'], container['name']) + +@cmd_run(podman_compose, 'unpause', 'Unpause all running containers') +def compose_pause(compose, args): + containers = list(reversed(compose.containers)) + for container in containers: + compose.podman.run(['unpause'], container['name']) + ################### # command arguments parsing