- An image is built from a Dockerfile with
docker build;COPYputs a copy of a file from the build context into the image. - Each instruction is an image layer, and
docker historylists the layers; a tag is a version name, and a build moves it to the new image. - The cache takes a step ready-made as long as the step itself, the steps above it and the files for
COPYhave not changed; after a changed step everything below runs again. - The edit at the start of the lesson did not reach the site: the container served the copy of index.html from the site:1 image, and
docker restartdoes not change it — it takes a new image and a new container from it.
Step 7 of 7 · summary · 2 min
Summary
Found an inaccuracy? Report an error in the lesson