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
#1
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.

Clues?

Thanks,
ssteinerX
Felix Siegrist (4) [Avatar] Offline
#2
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. http://192.168.99.100:8000.
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
#3
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.

S
Felix Siegrist (4) [Avatar] Offline
#4
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: https://forums.manning.com/posts/list/37743.page
aidanhs (25) [Avatar] Offline
#5
Thanks for posting Felix, yes the `-t` is missing and will be included on the errata list.