This article is part of TIPs and Tricks section of ITM Thoughts and is following the previous article about installing Docker on Windows Server 2016, you can read this article on this link http://www.itmthoughts.com/2018/06/installing-docker-on-windows-server-2016/
I’ve recently installed Docker EE on Windows Server 2016, unfortunately, I couldn’t execute any docker command and I always get the error message like the below.
docker : C:\Program Files\Docker\docker.exe: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.30/containers/create: 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.
I’ve checked the docker service in services.msc and found Docker service set to Automation but it is not started. Also, in Windows Event Viewer some error events are generated for the same subject.
I tried to start docker daemon by command line, and I got the same error message.
This error says that couldn’t initialize network controller; the fact is that docker creates its network to allow Containers get network access (IP address and NATing) through this network interface.
So I check to see if there is network created for containers by running this command.
moreover, there were no results, and it looks like docker failed to create the required network interfaces.
So, I searched online and found that we can reset network configuration by running the following command.
Now It is time to reinstall Docker by the two PowerShell commands mentioned early in this blog and run get-ContainerNetwork command
Now it seems that the network was created successfully, tried to start docker daemon by command dockerd and it was successful.
That’s all for this tip, I hope you like these light tips and looking forward for your comments and feedback.