podman: added the --out option for capturing formatted output emitted by various commands

Commands like podman-create(1), podman-run(1), podman-inspect(1),
podman-ps(1) will emit formatted output upon success. This allows
the output from commands to be emitted directly to a file and
can supersede the --noout parameter by using /dev/null. An issue
with --noout was also remedied.

This closes issue #18120.

Signed-off-by: Ali Rizvi-Santiago <arizvisa@gmail.com>
This commit is contained in:
Ali Rizvi-Santiago
2023-04-11 10:41:13 -05:00
parent 710315d33c
commit bb2deef8e1
5 changed files with 105 additions and 17 deletions

View File

@ -95,9 +95,8 @@ and "$graphroot/networks" as rootless.
For the CNI backend the default is "/etc/cni/net.d" as root
and "$HOME/.config/cni/net.d" as rootless. CNI is deprecated from Podman in the future, use netavark.
#### **--noout**
Redirect stdout to /dev/null. This command prevents all stdout from the Podman command. The **--noout** option is not block stderr or stdout from containers.
#### **--out**=*path*
Redirect the output of podman to the specified path without affecting the container output or its logs. This parameter can be used to capture the output from any of podman's commands directly into a file and enable suppression of podman's output by specifying /dev/null as the path. To explicitly disable the container logging, the **--log-driver** option should be used.
#### **--remote**, **-r**
When true, access to the Podman service is remote. Defaults to false.