question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

not able to connect to docker on Windows

See original GitHub issue
client = docker.from_env()
client.images.list()

or any other function calls gives this error:

 File "C:\Python27\lib\site-packages\docker\models\images.py", line 209, in list
    resp = self.client.api.images(name=name, all=all, filters=filters)
  File "C:\Python27\lib\site-packages\docker\api\image.py", line 93, in images
    res = self._result(self._get(self._url("/images/json"), params=params),
  File "C:\Python27\lib\site-packages\docker\utils\decorators.py", line 47, in inner
    return f(self, *args, **kwargs)
  File "C:\Python27\lib\site-packages\docker\api\client.py", line 175, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 501, in get
    return self.request('GET', url, **kwargs)
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "C:\Python27\lib\site-packages\requests\adapters.py", line 423, in send
    timeout=timeout
  File "C:\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 594, in urlopen
    chunked=chunked)
  File "C:\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 361, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "C:\Python27\lib\httplib.py", line 1057, in request
    self._send_request(method, url, body, headers)
  File "C:\Python27\lib\httplib.py", line 1097, in _send_request
    self.endheaders(body)
  File "C:\Python27\lib\httplib.py", line 1053, in endheaders
    self._send_output(message_body)
  File "C:\Python27\lib\httplib.py", line 897, in _send_output
    self.send(msg)
  File "C:\Python27\lib\httplib.py", line 859, in send
    self.connect()
  File "C:\Python27\lib\site-packages\docker\transport\npipeconn.py", line 31, in connect
    sock.connect(self.npipe_path)
  File "C:\Python27\lib\site-packages\docker\transport\npipesocket.py", line 22, in wrapped
    return f(self, *args, **kwargs)
  File "C:\Python27\lib\site-packages\docker\transport\npipesocket.py", line 50, in connect
    win32pipe.WaitNamedPipe(address, self._timeout)
pywintypes.error: (2, 'WaitNamedPipe', 'The system cannot find the file specified.')'

pip freeze


backports.ssl-match-hostname==3.5.0.1
docker==2.0.0
docker-pycreds==0.2.1
enum34==1.1.6
futures==3.0.5
grpcio==1.0.4
grpcio-tools==1.0.4
ipaddress==1.0.17
protobuf==3.1.0.post1
pymongo==3.4.0
pypiwin32==219
pyserial==3.2.1
requests==2.12.4
six==1.10.0
websocket-client==0.40.0


Docker version 1.12.3, build 6b644ec

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
nicoladj77commented, Jan 19, 2017

I’ve got the same issue, docker installed with an installer from their website

0reactions
shin-commented, May 23, 2018

VMs created using Toolbox don’t expose a named pipe and should be connected to using their TCP address. Make sure you set the appropriate environment variables as indicated in the docker-machine env command output.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't connect to Docker Container on Windows
Check the docker inspect or docker ps results to ensure that you have your port exposed correctly · Try to connect to it...
Read more >
Docker for windows won't launch
Has anyone had any problems with Launching Docker for Windows lately, haven't started docker for a couple of days but now it wont...
Read more >
Troubleshooting Docker client errors on Windows - Visual ...
Right-click Docker for Windows in the notification area, and then select Settings. Select Resources > File Sharing and share the folder that ...
Read more >
How To Install Docker Desktop And Troubleshoot Issues In ...
Type and search Services in the windows search box or open run then type services.msc and click Ok. Then you will see a...
Read more >
Can not connect to container on Windows 10 Home : r/docker
To do it this way, you need to make sure that your firewall on your Windows 10 OS is not blocking your ports....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found