- An image is a program's files and a default command; a container is a run of an image with its own name and status.
docker psshows running containers anddocker ps -ashows all of them; a stopped one hasExitedand its exit code.- A container runs while its main process runs;
docker logskeeps everything the process printed. docker execruns commands in a running container, and on the server its processes are visible inps.docker pswas empty becausehttpdwithout-fwent to the background: the main process ended with code 0, andwebstopped.
Step 6 of 6 · summary · 2 min
Summary
Found an inaccuracy? Report an error in the lesson