I am on Windows Server 2019 using Docker Desktop 4.16.3 (96739).
In preparation for a side project I test built a Docker project consisting of a Go-base API server and Caddy. I created my files, my volume and ran docker compose up and was off to the races. Now it was time to do the same thing for the real project so I copied my working files, did a few tweaks, and repeated the process only to receive:
docker endpoint for "default" not found
I searched around for a solution, tried a few like deleting my .docker folder, even deleted every container, image and volume, but keep getting the same error. I can go back to my original project and rebuild it with no issue so Iām at a loss especially since I donāt even understand what that message means
Here is my Dockerfile:
FROM golang:1.19
WORKDIR /app
RUN go install github.com/cosmtrek/air@latest
COPY go.mod ./
RUN go mod download
CMD ["air", "-c", ".air.toml"]
Itās important to note that if I remove the 6 lines related to go under services Docker will build and run Caddy with no issue. If I run docker build .\ I get no errors so I have to assume thereās some disconnect in the go part of services.
I had the same issue and what I did was to remove ~/.docker/contexts. In my case it was a symlink from a previous installation. I was able to recreate the context using docker context create.