Docker containers
Docker images are a read-only template of the application stack bundle and they don't have any state associated with them. The Docker container is spun off from the Docker image and it adds a read-write layer on top of the static image layers. If we try to draw a comparison with the object-oriented programming paradigm, Docker images are typically classes, whereas Docker containers are objects (instances of the classes).
The Docker image defines the behavior of the Docker container such as what process to run when the container is started. In the previous chapter, when you invoked docker run hello-world, the Docker Engine launched a new container from the hello-world Docker image and it went on to output quite a lot of information ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access