May 21, 2023, 9:08am
I am getting the following issue when running
docker-compose up in on my machine
[+] Building 0.1s (2/2) FINISHED
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 119B 0.0s
failed to solve: Internal: Internal: stream terminated by RST_STREAM with error code: INTERNAL_ERROR
For some context, I am just trying to get a basic golang image up as per this
docker-compose.yml file looks like this
My Dockerfile looks like this
Other details about my system:
Docker version 4.19.0
What I have referred to:
Docker build not working: rpc error (PROTOCOL_ERROR) I have also referred to another stack overflow thread “docker-compose, failed to solve: rpc error: code = Unknown desc = failed to compute cache key: “/app/package.json” not found: not found” (sorry I could only put 2 links)
I have another repository with a docker-compose.yml that starts up a django and postgres container and works fine. Can’t share more about that because it’s work related.
What I have done:
toggling buildkit on and off
turning off other network services like Synctazor on my machine
uninstall and reinstall docker, restart, update docker desktop
May 21, 2023, 5:12pm
It seems you tried hard. I didn’t remember it, but there was another related issue before:
Hi! Same issue here. FYI, updating Docker Desktop from version 4.15.X to 4.16.1 fixes the issue and I was finally able to (re)add “node_modules/” in my .dockerignore
The last user who commented could solve it by updating Docker which you tried too, but which version did you update from?
May 21, 2023, 11:33pm
I didn’t take note of what the previous version was, but it must be quite some time since I last update…,
However, I found a very strange workaround for the issue:
The error seems to come about when I run docker-compose from a newly clone github repository (my own repo)
However, when I made a new directory locally instead and ran docker-compose from there, it worked and I was able to get containers built, use docker bash etc.
Have you encountered similar issues before?
May 22, 2023, 5:35am
No, but I rarely use Docker on Windows. So the error happens only when you build a specific image or could you build the same content by creating everything locally instead of cloning from the repo?
May 24, 2023, 12:30pm
I was able to build the same content by creating everything locally
May 25, 2023, 6:40am
Then my guess is that your Git client on Windows changes line endings when you clone the project. Git Bash let’s you turn this behaviour off when you install it. I don’t know why line endings would cause the error you had, but chaning line endings automatically can definitely cause problems.
May 26, 2023, 1:32pm
Thank you for bringing this up! Never knew of such a thing and I will have to look into this further
@rimelek clone from git bush really worked for me, thanks a lot! Will be greate to add that info into guide page for windows section Containerize an application | Docker Documentation