Skip to content

Instantly share code, notes, and snippets.

@4sskick
Created March 1, 2024 04:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4sskick/eea852a9c54dd1907af63dbcf6261528 to your computer and use it in GitHub Desktop.
Save 4sskick/eea852a9c54dd1907af63dbcf6261528 to your computer and use it in GitHub Desktop.
I did change on one service which defined on docker-compose, so need to rebuild the service specific. When run command `docker-compose build name_service_app`, It failed and got timeout when doing fetch metadata token
```
failed to solve: maven:3.6.3-openjdk-17-slim: failed to authorize: failed to fetch anonymous token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Fmaven%3Apull&service=registry.docker.io": read tcp 192.168.0.176:55021->54.198.86.24:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
```
when doing run `docker-compose up` got loine log error `2024/02/29 17:44:52 http2: server: error reading preface from client //./pipe/docker_engine: file has already been closed`.
I did restart, solve nothing. So reinstalling I did and nothing solve, got another error like on forum https://forums.docker.com/t/an-unexpected-error-was-encountered-while-executing-a-wsl-command/137525/11. None solvable solution there.
Last solution I open `settings.json` file on path `C:\Users\%UserName%\AppData\Roaming\Docker` and look for `wslEngineEnabled` from true to false.
Because from the begining I set the wsl2 as backend. After did the change then reopen the docker desktop it run normally and able ti rebuild the container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment