Loading tutorials
docker exec into an exited container, and logs from a container stuck in created will be empty. This chapter covers the six states, how a container moves between 6 min readdocker run, docker build), can use a Linux shell, and know the difference between ENTRYPOINT and CMD. It also assumes you have seen the container states from the previous chapter: created, running, restarting, paused, exited, and dead5 min readdocker logs shows, where that output comes from, and the cases where it shows nothing. It assumes you can run containers and use a Linux shell. It also assumes you have located t5 min readdocker exec runs a new process inside a container that is already running. This chapter covers how to use it to inspect a live container, what it can and cannot tell you, and the errors you will hit most often.5 min readdocker ps and docker inspect output, know how ENTRYPOINT and CMD combine, and are comfortable in a Linux shell. It also assumes you have already looked at the exit code and logs of the failed container.7 min readdocker inspect output and exit codes, which earlier chapters cover. You should also know that a container is a Linux process running inside cgroups, which are kernel limits on memory, CPU, and process count. Here you will learn to confirm that a container was kill6 min readdocker run, read docker logs output, and interpret exit codes as covered in the earlier chapters. It also assumes you know what ENTRYPOINT and CMD do. Here you will learn how restart policies change what you see when a container fails, how to reco6 min readdocker inspect output, and write a Dockerfile with ENTRYPOINT and CMD. It also assumes you know what an exit code means from the earlier chapters. A running container is not always a working container. Health checks let Docker test whether the 6 min readdocker events, which streams what the Docker daemon does as it does it. It assumes you can already list and inspect containers, read exit codes, and know what a restart policy does. Earlier chapters showed you the state a container is in now. This one shows you the sequence of 6 min readdocker run, docker exec, and docker logs. It also assumes you know that a Linux process runs inside namespaces, which are kernel features that limit what a process can see. You should be able to read basic ps, ss, and curl output.6 min readdocker run, read docker inspect output, and use docker exec (covered in earlier chapters). It also assumes you know basic TCP ideas: IP address, port, and the difference between "connection refused" and "timed out".5 min read-v or --mount, read docker inspect output, and use docker exec (covered earlier in this tutorial). You should also know that Linux files have a numeric owner (UID) and group (GID) and a permission mode.5 min readdocker rm. This chapter shows how to examine that leftover state to learn what a container did before it died.6 min readdocker ps, docker inspect, docker logs, and docker exec on single containers, and that you have read a basic compose.yaml. Compose adds a project layer on top of those6 min readdocker run and docker build, read a Dockerfile's ENTRYPOINT and CMD, use a Linux shell, and know that processes end when they receive signals. Each step below narrows the problem, so you never need 5 min read