Add more information and examples on podman and pipes

Improve the documentation to help users to know proper way to
use podman within a pipe.

Helps Prevent: https://github.com/containers/podman/issues/8916

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh 2021-01-13 08:27:39 -05:00
parent bbff9c8710
commit a7c0c9125f
No known key found for this signature in database
GPG Key ID: A2DF901DABE2C028
2 changed files with 14 additions and 2 deletions

2
.gitignore vendored
View File

@ -33,3 +33,5 @@ release.txt
result
# Necessary to prevent hack/tree-status.sh false-positive
/*runner_stats.log
.install.goimports
.generate-bindings

View File

@ -1011,8 +1011,11 @@ When set to **true**, Podman will allocate a pseudo-tty and attach to the standa
input of the container. This can be used, for example, to run a throwaway
interactive shell. The default is **false**.
**NOTE**: The **-t** option is incompatible with a redirection of the Podman client
standard input.
**NOTE**: The --tty flag prevents redirection of standard output. It combines STDOUT and STDERR, it can insert control characters, and it can hang pipes. This option should only be used when run interactively in a terminal. When feeding input to Podman, use -i only, not -it.
```
echo "asdf" | podman run --rm -i someimage /bin/cat
```
#### **--tz**=*timezone*
@ -1528,6 +1531,13 @@ weight by **--blkio-weight-device** flag. Use the following command:
$ podman run -it --blkio-weight-device "/dev/sda:200" ubuntu
```
### Using a podman container with input from a pipe
```
$ echo "asdf" | podman run --rm -i --entrypoint /bin/cat someimage
asdf
```
### Setting Namespaced Kernel Parameters (Sysctls)
The **--sysctl** sets namespaced kernel parameters (sysctls) in the