Docker Community Forums

Share and learn in the Docker community.

Can't connect to Docker-machine on Docker for Windows

Hello, i’m trying to run the example in Get Started Docker Machine but when I run the curl command with the docker-machine IP it gives me this error:

curl : Unable to connect to the remote server
At line:1 char:1

  • curl
  •   + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
      + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

I’m running Docker for Windows on Windows 10 and using Linux Containers. How can I fix this error? Can I run something similar using a Windows Container?

Curl can not connect to this ip:port, so either the IP is wrong (check with docker-machine ls) or the nginx container from the example is not running (check with docker container ls).