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
docker-compose build hangs #4396
Comments
Can you try again with |
As well as the output of |
|
|
I've got the same issue, with the same It seems both @bfallik and I are using AWS ECR.
|
Thanks for sharing. I must admit, I'm stumped - doesn't look like anything obvious is happening on the client side that would cause issues to occur while pulling. Do you see anything relevant in the Docker daemon logs that could indicate a failure while processing the build request? |
@shin- I'm trying to follow them with
Is there some other way I can view what's going on? |
@bfallik Here's what I do when I need to dig in
|
@shin- Unfortunately I'm on OSX and I'm not as familiar with it as I might be with Linux. I don't see even a dockerd command available to me. I imagine it's buried somewhere in the Docker for Mac packaging. |
I'm less familiar with Mac OS and D4M, but I think you can add |
@shin- so this is weird. When I restart the daemon with
I added those newlines to note when Docker completed its startup and when I invoked docker-compose. |
It's as if my docker client isn't talking to that daemon but I don't have any DOCKER_HOST variable set:
|
Really odd. My colleague was able to build the project which I am unable to, on the same version of docker. So far, I've tried:
All to no avail. |
Sweet mother of god. There's a SO post which mentions My colleague was using Safari and his was working. I told him to open chrome and try again. It failed Armed with this knowledge, I was able to fix by:
What. On. Earth. Update |
@mrjackdavis that is super weird. I just tested docker-compose after killing Chrome but that didn't workaround my hang so maybe they're separate issues? |
@bfallik did you also try it on an empty repository? I updated the fix in my previous comment |
@mrjackdavis No, what did you mean by an empty repository? Which repository? |
@bfallik Sorry - I wasn't clear. I deleted my repository (my project files, with |
Is there an ETA for the fix for this? I haven't been able to use Docker for my projects for over a month now. The workaround to exit Chrome is ridiculous. |
Agreed. The chrome workaround isidiotic. I've settled with a bash script which uses |
Does anyone have any idea why Chrome would even interact with |
Docker Black Magic™ |
Does this only affect users who push their Docker repository to AWS ECR? If it affects anybody who uses Chrome, I imagine this issue would be of higher profile. |
@mrjackdavis In my case I'm not pushing the images to ECR, or anywhere else for that matter. |
I have Chrome open and I can execute a
Try the latest versions of everything just to be sure. And if that doesn't work: This bug seems specific to Docker for Mac right? (e.g., does executing it against a What step of the build does it get stuck on? What does the Docker daemon log (try something like |
@nathanleclaire I don't believe this is always an issue for Chrome + DfM or this ticket would have generated much more interest. I don't know what you mean by "what step of the build does it get stuck on?" What are my options? I posted sample output above in case that helps you narrow the step down. brian |
Hm, I guess I had thought this might have been an issue with a build step yesterday (so I was wondering if it was hanging on a Is your |
@nathanleclaire It might be related to ECR though in my case I wasn't actually building an image for ECR. The Dockerfiles in use don't reference any ECR URLs. The two images I was trying to build were based on I agree it might be hanging trying to auth with ECR but it's strange that it's trying to do that in the first place. Maybe that's part of the problem. |
In my case, |
I was facing same issue, docker-compose build hang, and reason at my end was I didn't have enough space. After creating some space its start working. |
I was facing this issue as well. The problem was that I needed to add the ssh private keys to ssh agent. |
Had the issue, and as for @dmoliveira it was because of a too heavy repo. Adding big files to Maybe a warning message when the Cheers |
I'm getting this now and it seems to be caused by recently using |
This was sending me mental. In the end, I had to remove my php application from my project folder. Therefore, I'll be adding it to my |
I was seeing the same issue - Thanks to all you guys I looked in my repo for the largest files - found a Beefing up my .dockerignore now... |
Hey :) Just in case, I had the same problem but very different reason. In my docker-compose folder there's a data folder that should have been ignored and is HUGE. |
嗨, 我的情況跟 @w2ak 一樣。 在我的 docker-compose build 資料夾中,有一個被忽略的巨大檔案,請使用 |
In my case there was a ton of extra stuff in the context directory bogging things down a bit...video output from cypress etc. |
Adding .dockerignore works, thanks #4396 (comment) |
In my case it is because I use string variable interpolation in |
In my case using |
My build was always hanging right at the start ("building xxxx"). I saw the suggestion to close Chrome, tried it, and the build immediately got unstuck. I couldn't believe it worked. |
I just realized that my context (actual folder) was too big. So I moved my dockerfile to another folder and change my #...
services:
app:
build:
context: ./another-folder-here
dockerfile: YourDockerfileNameThatIsInsideAnotherFolderHereOrRemoveThisPropertyIfTheNameIsDockerfile
# .... |
This just fixed my build too. It seems maybe building is searching through directories for some reason and hanging, even when told which files to read? As soon as I moved my dockerfiles into a subfolder and modified the context rather than sitting in the root, my builds stopped hanging and ran perfectly. |
In my case, docker-compose was hanging on a massive node_modules tree. Ignoring node_modules with a .dockerignore file solved the issue. |
in my case I was using WSL 2. it hanged sometimes. i think putting my files in the WSL file tree worked |
In my case (using WSL 2 as well), signing out from my Docker ID account fixed the issue. Using |
I am having the symptom described by @igorantun , where it stops at an auth step, in my case Edit: I THOUGHT I found a fix. In an elevated powershell Edit: Refer to docker/for-win#7808 |
For anyone having the same issue with WSL, the correct Docker for Windows issue @patricknazar mentioned is the following: docker/for-win#7808 As it seems, a recent Windows (Insider) release broke Also, this note present at the Docker for Windows issue worked for me:
|
I ran into this issue, for a docker-compose build that processes images to animate sequences. I had a subdir of 66GB, adding that to .dockerignore resolved my hanging build |
I ran to this issue, the problem was the files inside my Deleting these big files and adding them to |
@augnustin Wow, thanks a lot! This is a really tricky, hard to find error but your comment helped! |
You just saved my life. In 2021! |
I'm trying to use
docker-compose build
but the command hangs:docker-compose.yml contains
and go/.dockerignore has
The same invocation via
docker build
completes in about a minute:Any idea what's going on here?
The text was updated successfully, but these errors were encountered: