June 2016
Intermediate to advanced
600 pages
8h 6m
English
The first thing to do is to check the Docker logs. First, get the ID for the container by using the “–a” flag to list all containers, including stopped containers as shown:
docker ps –a
Once you have the image ID, view the logs by typing
docker logs <id>
If the answer isn’t immediately obvious, you can connect to the container directly as we discussed earlier in the chapter by overriding the container’s entrypoint in the Docker run command as shown below:
docker run –t -i -p 80:80 --entrypoint=/bin/bash thedanfernandez/ productcatalog
This snippet replaces the “–d” (detached) flag with the “–i” flag to run interactively and overrides the Dockerfile entrypoint to instead start the bash ...
Read now
Unlock full access