Build problems with Windows Containers in Docker

The objective of this article to explain, different problems that we can face when we choose to use Windows containers instead of Linux containers while installing the Docker.

Problem 1:

C:\Users\doodle\cheers2019> docker build -t subbareddyroyal/cheers2019 .

error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/build? buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0 &cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0 &memswap=0&networkmode=default&rm=1 &session=5mkq4eaqhltzh42vectdfwvtq&shmsize=0 &t=subbareddyroyal%2Fcheers2019 &target=&ulimits=null&version=1: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be
run elevated to connect. This error may also indicate that the docker daemon is not running.

The reason why I was getting that error is, Docker engine was not started. So, make sure you have started the Docker Desktop before running the above build command.

Problem 2:

no matching manifest for windows/amd64 10.0.17134 in the manifest list entries

To solve the above problem, right-click on Docker and choose Settings. Go to Daemon and enable the Experimental feature then click on the Apply button. Docker will automatically restart. Look at the below snapshot. Then again try to run the build command.

Otherwise, you can also add –experimental to the above build command. But, passing this parameter is temporary and it may cause the issue in the future as well. So, I would like to suggest to follow the above enabling Experimental feature option.

If still, you face a similar issue while building, you can pull the amd64 specific files by issuing the below command.

docker pull

Restart the Docker and then issue the same above doodle build command to build.

If still your problem is not solved with the above solution, Switch docker containers from Windows to Linux. Look at the below snapshot,

You will be alerted with the below and alert message, look like below. Click on the Switch button to proceed further. This may take several minutes to complete.

Then issue the same build command to build the project. For me, Switch to Linux containers helped and build the project successfully.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s