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

Clarify documentation of container removal flags #498

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion podman/domain/containers_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ def create(
read_only (bool): Mount the container's root filesystem as read only.
read_write_tmpfs (bool): Mount temporary file systems as read write,
in case of read_only options set to True. Default: False
remove (bool): Remove the container when it has finished running. Default: False.
restart_policy (Dict[str, Union[str, int]]): Restart the container when it exits.
Configured as a dictionary with keys:

Expand Down
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
Loading