
Explanation:
Step 1: docker pull
Pull the Nano Server base image.
Step 2: docker add
Add the custom file.
The ADD command is used to copy files/directories into a Docker image. It can copy data in three ways: Copy files from the local storage to a destination in the Docker image. Copy a tarball from the local storage and extract it automatically inside a destination in the Docker image.
Step 3: docker build -
Build the image.
docker build creates the image by referring to a script,
Step 4: docker commit
Docker commit preserves an existing container into container image.
Note:
A Nano Server base image is an extremely small, stripped-down version of Windows Server used to build Windows containers. It contains only the essential components for running applications, resulting in a smaller footprint, faster deployment, and a reduced attack surface compared to Server Core or full Windows images.
Reference:
https://circleci.com/docs/guides/execution-managed/custom-images/