The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

ssteinerX (9) [Avatar] Offline
I'm using Docker with Kitematic on OS X.

I run the first example, it starts, gets to the "...port 8000", then I'm stuck there.

Never returns to command line, Ctrl-C has no effect, can't connect to Docker from another terminal, specified port "refuses connection."

This site can’t be reached
localhost refused to connect.

Just hung and nowhere to go.


Felix Siegrist (4) [Avatar] Offline
After the console output "Swarm server started port 8000" the server is running and waiting for incoming requests. So it's correct that you don't return to the command line prompt.
To access the server you should use the IP address of the docker host (running in the virtual box) instead of localhost, e.g.
Run echo $DOCKER_HOST to find out this IP address.

To stop the server run docker stop example1 from another terminal. Ctrl-C does only work when you started the container using the -t option (allocate a pseudo-TTY).
ssteinerX (9) [Avatar] Offline
I was just following the commands in the book and that was the result I got. Don't remember whether -t was in the book's command, but if it had been, I'm sure I would have typed it -- I knew doodly about Docker at that point.

Thanks for the answer anyway, maybe check the exact command in the book 'cause it shows ^C working and refers to it in the text.

Felix Siegrist (4) [Avatar] Offline
Yes, the -t is missing in the text. I just wanted to give you a hint how you can make it work.

See also here:
aidanhs (25) [Avatar] Offline
Thanks for posting Felix, yes the `-t` is missing and will be included on the errata list.