However, the actual image has many layers, and each layer depends upon the one before it. You might expect that this Dockerfile will produce an image with two layers, one for the container OS image, and a second that includes IIS and the website. ![]() ![]() RUN echo "Hello World - Dockerfile" > c:\inetpub\wwwroot\index.html RUN dism /online /enable-feature /all /featurename:iis-webserver /NoRestart # Sample DockerfileįROM /windows/servercore:ltsc2019 The result is a new image layer for each actionable instruction.įor example, the following sample Dockerfile uses the /windows/servercore:ltsc2019 base OS image, installs IIS, and then creates a simple website. During the Docker build process, a Dockerfile is consumed, and each actionable instruction is run, one-by-one, in its own temporary container. Image layers in Docker buildīefore you can optimize your Docker build, you'll need to know how Docker build works. ![]() This article explains how the Docker build process works and how to optimally create images for Windows containers. There are many ways to optimize both the Docker build process and the resulting Docker images.
0 Comments
Leave a Reply. |