- What does the FROM keyword do in a Dockerfile?
It starts our image from an existing one, adding more layers to it.
- How would you start a container with its predefined command?
You would run the following command:
docker run image
- Why won't creating a step to remove files from a Dockerfile create a smaller image?
Due to the layered structure of the filesystem that's used by Docker, each step in a Docker file creates a new layer. The filesystem is the result of all the operations working in tandem. The final image includes all the existing layers; adding a layer never reduces the size of the image. A new step for deleting will not be present in the final image, but it will always be available as part of the previous layer.
- How does a multistage Dockerfile work?
A multistage Dockerfile contains more than one stage, each of which will start with a FROM...