HesamHashemi
HesamHashemi

Reputation: 983

Docker endpoint for "default" not found

I did clone a project and in the first step when I tried to start the container, I did run windows CMD in my project root and I type this command:

docker-compose up --build

and this message is shown to me:

docker endpoint for "default" not found.

I'll be more than happy if somebody helps me. When I write this command for the first time I had an internet problem it got paused, in second time started to download something then this message printed.

I tried to delete my old Containers, also I try with my VPN on and off, and restart docker in PowerShell.

Upvotes: 86

Views: 49054

Answers (8)

Rafael Xavier
Rafael Xavier

Reputation: 1083

Please follow these steps bellow:

  1. Stop Docker Desktop and all containers.

  2. Go to path:

~/.docker/contexts/meta/(some sha256)/meta.json

Using Windows it should be on:

C:\Users\YOUR_USER\.docker\contexts\meta\(some sha256)\meta.json

This meta.json file should be just full of NULLs or empty.

  1. Delete this hashed path with this meta.json file inside of it.
  2. Restart Docker

Done.


Notes:

  • Please backup before deleting.
  • Don't be afraid to lose data because with this approach we should remove ONLY this NULL/Empty file (and folder). Just be aware to not delete any important files.

Upvotes: 27

SAB
SAB

Reputation: 309

In linux environmnmet, you can do

rm -rf ~/.docker/contexts/meta/

Upvotes: 0

pscheit
pscheit

Reputation: 2981

This comment helped me better then nuking the whole directory:

https://github.com/docker/compose/issues/9956#issuecomment-1294483086

(check an empty meta.json in ~/.docker/contexts/meta/(somelong hash)/meta.json, delete it)

Upvotes: 61

GMKHussain
GMKHussain

Reputation: 4719

  1. Open folder C:\Users\<YOUR-USER-NAME>\
  2. Rename .docker directory. with .docker_temp
  3. Restart docker
  4. Run command docker-compose up --build

Its works!

Upvotes: 2

allan
allan

Reputation: 979

I couldn't get this working following all the suggestions. In the end I edited the empty meta.json file under C:\Users\USERNAME\.docker\contexts\meta\GUID\meta.json, and just pasted the following from a previously working file:

{"Name":"temp","Metadata":{"StackOrchestrator":"swarm"},"Endpoints":{"docker":{"Host":"unix:///var/run/docker.sock","SkipTLSVerify":false}}}

Then it started working again!

Upvotes: 0

Ashish Katiya
Ashish Katiya

Reputation: 45

Try to delete ".docker" folder. This helped in my case.

run- ".docker"- delete the folder

Upvotes: 2

infiniteLearner
infiniteLearner

Reputation: 4209

For Windows Users

  1. Delete .docker directory. Which exists on PATH C:\Users\your-username\.docker
  2. Restart docker.

Upvotes: 186

stackoff
stackoff

Reputation: 69

Try to delete ".docker" folder. This helped in my case.

Upvotes: 5

Related Questions