How it works...

When we build a Docker image using the docker image build command, we specify a directory. This command bundles the entire directory tree as the build context and transfers it to the Docker engine to create the Docker image. This is evident from the build output Sending build context to Docker daemon 2.048 kB message. If there is a file named .dockerignore in the current working directory with the list of files and directories (new-line separated), then those files and directories will be ignored in the build context. More details about .dockerignore can be found at https://docs.docker.com/reference/builder/#the-dockerignore-file.

Now, the Docker build system will read each instruction in the Dockerfile, launch an intermediate container, execute the instruction inside the container or update the metadata, commit the intermediate container as an image layer, and remove the intermediate container. This process is continued until all the instructions in the Dockerfile are executed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.143.77