summaryrefslogtreecommitdiff
path: root/docs/source/markdown
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-01-13 08:27:39 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-01-13 15:08:46 -0500
commita7c0c9125fba436669f28ab199aae5df3c48b2ae (patch)
treef86d2140e23c5f54f6b093e2d18e600cfbe733f4 /docs/source/markdown
parentbbff9c8710870bbadbaf2e69e827db30c109bbb9 (diff)
downloadpodman-a7c0c9125fba436669f28ab199aae5df3c48b2ae.tar.gz
podman-a7c0c9125fba436669f28ab199aae5df3c48b2ae.tar.bz2
podman-a7c0c9125fba436669f28ab199aae5df3c48b2ae.zip
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>
Diffstat (limited to 'docs/source/markdown')
-rw-r--r--docs/source/markdown/podman-run.1.md14
1 files changed, 12 insertions, 2 deletions
diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md
index 674079a9d..74c231184 100644
--- a/docs/source/markdown/podman-run.1.md
+++ b/docs/source/markdown/podman-run.1.md
@@ -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