Skip to content
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 build task is hanging #37

Open
wgorder opened this issue Dec 19, 2014 · 6 comments
Open

docker build task is hanging #37

wgorder opened this issue Dec 19, 2014 · 6 comments

Comments

@wgorder
Copy link

wgorder commented Dec 19, 2014

This is the last line of output I see

12:17:59.618 [INFO] [se.transmode.gradle.plugins.docker.DockerTask] Using the native docker binary.
> Building 95% > :server:dockerBuild

I can run the command manually with no issues. I am not sure what is going on.

@petehayes
Copy link

I have run into the same problem. It is because in the NativeDockerClient, when it executes the docker command it does a waitFor() on the process. If the docker build process generates a lot of output to standard out or standard err, then it will eventually fill a buffer of the executing process and the process will block indefinitely while trying to write to the stream. Whenever processes are executed, you have to consume the standard out and standard err or ensure that there is little to no output in there.

@cdancy
Copy link

cdancy commented Apr 8, 2015

So the solution is to NOT use this task but instead fall back to using exec? @petehayes maybe we should put together a PR to solve the issue? I'm not sure how active this project is anymore judging from lack of commits going in

@petehayes
Copy link

Yes, I was going to give that a shot at some point to fix this and issue a pull request.

@magnus-larsson
Copy link

Hi, what is the status of this issue?

From my understanding this issue is, in many cases, a blocker for using the plugin on Windows?
(never seen the problem on OS X)

See for example a discussion on the subject in the following blog post: http://callistaenterprise.se/blogg/teknik/2015/06/08/building-microservices-part-4-dockerize-your-microservices/

Regards,
Magnus.

@petehayes
Copy link

In our case, we decided to move to the other gradle docker plugin so I won't be contributing a patch.

@magnus-larsson
Copy link

Ok, thanks for the update. I just realised that it already exists a pull request that seems to solve the issue so I'll post a comment there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants