Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker on Windows 10 "driver failed programming external connectivity on endpoint"

I got the same error message on my Windows 10 Pro / Docker v17.06.1-ce-win24 / Docker-Compose v1.14.0 using Windows Powershell x86 in admin mode.

The solution was to simply restart Docker.


If happens once, restarting Docker will do the work. In my case, it was happening every time that I restarted my computer.

In this case, disable Fast Startup, or you probably will restart Docker every time that your computer starts. This solution was obtained from here


Simply restaring Docker didn't fix the problem for me on Windows 10.

In my case, I resolved the problem with the exact steps below:

1) Close "Docker Desktop"

2) Run the commands below:

net stop com.docker.service
net start com.docker.service

3) Launch "Docker Desktop" again

Hope this will help someone else.


I got that error too, if you want to know the main reason why error happens, its because docker is already running a similar container, to resolve the problem( avoid restarting Docker), you must:

docker container ls

You got something similar to:

CONTAINER ID        IMAGE               COMMAND             CREATED
1fa4ab2cf395        friendlyhello       "python app.py"     28 seconds ago

This is a list of the running containers, take the CONTAINER ID (copy Ctrl+C)

Now you have to end the process (and let run another image) run this command.

docker container stop <CONTAINER_ID>

And thats all! Now you can create the container.

For more information, visit https://docs.docker.com/get-started/part2/


Normally this error happens when you are trying start a container but the ports that the container needs are occuppied, usually by the same Docker like a result of an latest bad process to stop.

For me the solution is:

  1. Open windows CMD like administrator, type netstat -oan to find the process (Docker is the that process) that is occuppying your port:

In my case my docker ports are 3306 6001 8000 9001.

  1. Now we need free that ports, so we go to kill this process by PID (colum PID), type

    TASKKILL /PID 9816 /F
    
  2. Restart docker.

  3. Be happy.

Regards.


I am aware there are already a lot answers, but none of them solved the problem for me.
Instead, I got rid of this error message by resetting docker to factory defaults:

enter image description here