Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to resolve docker endpoint: open C:\Users\username\.docker\machine\machines\default\ca.pem: The system cannot find the path specified. #7629

Closed
1 of 2 tasks
caroe2014 opened this issue Jul 11, 2020 · 8 comments

Comments

@caroe2014
Copy link

caroe2014 commented Jul 11, 2020

  • I have tried with the latest version of my channel (Stable or Edge)
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

By typing: docker --version it should show the version. The truth is that I can not do anything

Actual behavior

As soon as I type "docker" on the command prompt ans press "Enter" the following message is displayed:

unable to resolve docker endpoint: open C:\Users\Username.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

I looked into that path and the ca.pem file doesn't exist.

Information

  • Windows Version: 10
  • Docker Desktop Version: 2.3.0.3 (45519)
  • Channel: stable
  • Composer: 1.25.5
  • Engine: 19.03.8
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM:

Steps to reproduce the behavior

  1. For the issue to happen I don't need any Dockerfile.
  2. I go to the command prompt.
  3. Type: docker --version, and the issue will occur right away.

Troubleshooting Steps I tried:
Uninstall docker for Desktop and installed it again. I was hoping it would install the certificate, ca.pem, but it didn't happen.

@caroe2014
Copy link
Author

I solved the my own issue:
The previous versions had the public under: C:\Users\username.docker\machine\machines\default. The environment variable is pointing to it: DOCKER_CERT_PATH=C:\Users\username.docker\machine\machines\default\

The issue is that the new version has the public key under: C:\Users\username.docker\machine\certs\ If I upgrade it or uninstall it and installed it again, it doesn't update the DOCKER_CERT_PATH environment variable to the new path for the public key but keep the old one.

Solution:
I had to manually update the DOCKER_CERT_PATH=C:\Users\username.docker\machine\certs
Problem solved.

@fjt523
Copy link

fjt523 commented Jul 31, 2020

Another case for the same error:
PC Information:
Win10 home 2004, os 19041.264
wsl2 (ubuntu, with docker.io version 18.xx.xx installed). docker works fine in wsl2.

Actual behavior
Install 'Docker Desktop Installer (for win10 home) Version 2.3.0.4, stable channel'.
Then type 'docker' in cmd.exe
PS C:\Users\fjt\getting-started> docker version
unable to resolve docker endpoint: open C:\Users\fjt.docker\machine\machines\default\ca.pem: The system cannot find the path specified.

in wsl2:
'docker version' runs fine. and it report version is '18.xx.xx'. The original output is missing.

Solution
Remove 'docker.io' in wsl2. Then reinstall 'Docker Desktop Installer (win10 home)' in Win10

Note
The direcotry 'C:\Users\fjt\.docker\machine' doesn't exits. So I delete the windows environment variables: DOCKER_CERT_PATH DOCKER_MACHINE_NAME, DOCKER_TLS_VERIFY.
And docker runs ok:
C:\Users\fjt\getting-started>docker build -t docker101tutorial .
Sending build context to Docker daemon 10.2MB
Step 1/21 : FROM python:alpine AS base
alpine: Pulling from library/python
df20fa9351a1: Pull complete
...
Status: Downloaded newer image for python:alpine

@Manvityagi
Copy link

I solved the my own issue:
The previous versions had the public under: C:\Users\username.docker\machine\machines\default. The environment variable is pointing to it: DOCKER_CERT_PATH=C:\Users\username.docker\machine\machines\default\

The issue is that the new version has the public key under: C:\Users\username.docker\machine\certs\ If I upgrade it or uninstall it and installed it again, it doesn't update the DOCKER_CERT_PATH environment variable to the new path for the public key but keep the old one.

Solution:
I had to manually update the DOCKER_CERT_PATH=C:\Users\username.docker\machine\certs
Problem solved.

Thanks, it saved my day!

@pankajan05
Copy link

I solved my issue also.
thank you for this solution. After I update the DOCKER_CERT_PATH=C:\Users\username.docker\machine\certs in my environment variable it work fine.

@bakcyll
Copy link

bakcyll commented Oct 20, 2020

how can I change this variable? where it is?

@yogat3ch
Copy link

how can I change this variable? where it is?

@bakcyll Environment Variables on Windows. Windows key + S then type "Environment" and it should give the link for "Edit the system environmental variables"

@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Apr 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants