Closed someone-somenet-org closed 3 years ago
Did you try it without the -it?
what about this
$ echo "asdf" | podman run --rm -i --entrypoint /bin/cat $IMG
asdf
Is the use of -t hanging expected?
Yep - we've encountered this issue in the past. Our behavior matches Docker here. In brief, -t
isn't required in a lot of cases, and is actively detrimental in cases where IO based on pipes, redirecting STDIN/STDOUT, etc are in use.
Looks like we document this in the man page.
#### **--tty**, **-t**=**true**|**false**
Allocate a pseudo-TTY. The default is **false**.
When set to **true**, Podman will allocate a pseudo-tty and attach to the standard
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.
Interestingly Docker fails immediately without having to download any container image
esjolund@laptop:~$ docker --version
Docker version 20.10.5, build 55c4c88
esjolund@laptop:~$ echo "asdf" | docker run --rm -it --entrypoint /bin/cat centos:7
the input device is not a TTY
esjolund@laptop:~$ docker images | grep centos
esjolund@laptop:~$
We could probably add this check, easy enough. Would you like to take a stab at it?
I first need to get into programming in Golang. Sorry, I can't right now.
/kind bug
Description running
echo "asdf" | podman run --rm -it --entrypoint /bin/cat centos:7
hangs indefinitely.Describe the results you expected: Expected getting printed "asdf", the cointainer to exit and get back to shell.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes