Skip to content

Commit

Permalink
Update documentation for the remove flag in Container.run()
Browse files Browse the repository at this point in the history
This commit specifies more in depth the semantics of the `remove` flag
of the run() operation:
- it describes its interaction with detach=True
- it clarifies that it is a client-initiated operation
- it specifies that a similar daemon-side flag also exists with the name
  of `auto_remove`

Signed-off-by: Riccardo Paolo Bestetti <pbl@bestov.io>
  • Loading branch information
vmsh0 committed Jan 10, 2025
1 parent 6fc98fa commit 7edab3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions podman/domain/containers_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ def run(
By default, run() will wait for the container to finish and return its logs.
If detach=True, run() will start the container and return a Container object rather
than logs.
than logs. In this case, if remove=True, run() will monitor and remove the
container after it finishes running; the logs will be lost in this case.
Args:
image: Image to run.
command: Command to run in the container.
stdout: Include stdout. Default: True.
stderr: Include stderr. Default: False.
remove: Delete container when the container's processes exit. Default: False.
remove: Delete container on the client side when the container's processes exit.
The `auto_remove` flag is also available to manage the removal on the daemon
side. Default: False.
Keyword Args:
- See the create() method for keyword arguments.
Expand Down

0 comments on commit 7edab3c

Please sign in to comment.