sixeyed / diamol

Code samples for the book "Learn Docker in a Month of Lunches"
https://www.manning.com/books/learn-docker-in-a-month-of-lunches
Creative Commons Attribution Share Alike 4.0 International
496 stars 263 forks source link

Ch08-Dockerfile with a dependency #12

Closed eliassal closed 3 years ago

eliassal commented 4 years ago

Elton, when you try to run a container using docker container run -d -p 8082:80 diamol/ch08-numbers-web you show that the container exists right away ahen you list containers --all

This is not the case on my machine. I also deleted the container and image, then I build locally the imsgae using the dickerfile at ch08/exercises/numbers/numbers-web/Dockerfile.v2 it gave the same thing, container does not exist and I can browse the application docker ps containerDepend

sixeyed commented 3 years ago

Hi @eliassal - sorry for not getting back to you. I think 'immediately' is the issue here :) I've just run the exercise again and it takes just a few seconds longer for the startup check to exit the container:

PS>docker ps -a
CONTAINER ID   IMAGE                        COMMAND                  CREATED          STATUS                        PORTS     NAMES
0df1efdd9f7a   diamol/ch08-numbers-web:v2   "/bin/sh -c 'curl --…"   18 seconds ago   Exited (6) 13 seconds ago               vigilant_stonebraker