We have learned about three different methods for building images, and all of them use containers in some shape or form. Let's review the container actions that can be used to create images:
commit |
docker commit will allow us to create an image from a container. We will add a container's layer as a new image layer. As a result, we obtain a new image. We will set a new image name (although we learned that we can change image names whenever we need to) with its tag. The container will be paused during the commit to avoid file changes during its execution. |
export |
This action will create a .tar file containing the container's filesystem (including data from all of its layers). By default, this command will stream binary content to STDOUT, but we can use --output or -o to define a file for this content. |
When we need to know about the changes we made to the original image layers, we can use docker container diff. This will show...