Docker Community Forums

Share and learn in the Docker community.

Docker for Mac doesn't output to stdout when input stream is provided


(Dsmaher) #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.


(Manfred Berndtgen) #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


(Justin Cormack) #3

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.


(Dsmaher) #4

Thanks!

Good to hear… So far, this is the only issue I’ve had to switch back to my docker-machine VM for.


(Manfred Berndtgen) #5

It’s working now! Thanks a lot!


(Dsmaher) #6

I just installed the upgrade, and it works!

Thanks again!