mirror of
https://github.com/containers/podman-compose.git
synced 2024-11-22 16:03:16 +01:00
Add pause,unpause commands support
Signed-off-by: Mohammed Tayeh <info@tayeh.me>
This commit is contained in:
parent
f7d335dc6a
commit
10580db329
@ -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
|
||||
```
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user