Docker Windows dial tcp 127.0.0.1:2376: connectex: No connection could be made because the target machine actively refused it

Viewed 1089

I just installed Docker Desktop on Windows 10 and while running the command docker run hello-world, I keep getting the error "dial tcp 127.0.0.1:2376: connectex: No connection could be made because the target machine actively refused it"

Any solution to this problem, From other stackoverflow answers, I deleted the DOCKER_* env variables, but it did not solve the problem.

I even selected "Expose daemon on tcp://localhost:2375 without TLS" option as told by the answer in this link: Docker: No connection could be made because the target machine actively refused it

There were some solutions involving docker-machine command (see the link), but the windows powershell cannot find the command.

Any help is appreciated.

1 Answers

Remove DOCKER_TLS as well as DOCKER_HOST environment variables. Have your docker desktop running.

Then try executing: docker run -d -p 80:80 docker/getting-started

It should work.

Related