dsmaher
(Dsmaher)
May 3, 2016, 6:42pm
1
Expected behavior
Docker should output to stdout even if an input stream is provided.
This command:
echo test | docker run -i --entrypoint=/bin/cat busybox
Should output test
.
Actual behavior
Docker container runs, but there is no output. test
can be found in the docker logs
for the container, indicating that the command was executed.
Information
OSX 10.10.x
Docker version 1.11.0, build 4dc5990
Steps to reproduce the behavior
echo test | docker run -i --entrypoint=/bin/cat busybox
Should output test
.
mberndtgen
(Manfred Berndtgen)
May 3, 2016, 9:13pm
2
I second this. I was trying to do a
cat access.log | docker run --rm -i diyan/goaccess \
--time-format='%H:%M:%S' \
--date-format='%d/%b/%Y' \
--log-format='%h %^[%d:%t %^] "%r" %s %b "%R" "%u"' > access.html
which basically works but the output file (access.html) is empty. This again works:
docker run --rm diyan/goaccess --help > help.txt
help.txt contains the expected output.
Docker V 1.11.0-beta9 (build 6388) on OSX 10.11.4
Yes, I found this too just before the beta yesterday, we are just testing a fix in master, sorry this is broken, it will be fixed next week. It happens when the input stream is disconnected before the output happens, so most of the time if you pipe the output into docker.
1 Like
dsmaher
(Dsmaher)
May 4, 2016, 2:03pm
4
Thanks!
Good to hear… So far, this is the only issue I’ve had to switch back to my docker-machine
VM for.
mberndtgen
(Manfred Berndtgen)
May 11, 2016, 9:57pm
5
It’s working now! Thanks a lot!
dsmaher
(Dsmaher)
May 12, 2016, 7:13pm
6
I just installed the upgrade, and it works!
Thanks again!