-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Error preparing context folder under Windows #890
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
Comments
@lreimer I don't think this is a bug. To build image you have to send build context to docker daemon. In your case one of files is locked (partially) and can't be read. How would you fix that? The only solution is to release the lock. |
But why is it working OK under MacOS and only complaining under Windows? Is there maybe some kind of flag one could give to the Apache Commons TarArchiveOutputStream.finish() method? |
@lreimer because only on Windows some other process locks that file. The solution with flag is tricky, why we should silently remove locked files from build context? What if they are required to build an image? |
If I recall correctly, I also had similar issues and it seemed like the Gradle process itself (via daemon?) holds a lock on those files. My workaround was to copy the build context to another directory. |
Or just create |
Thanks for all your comments. I already have a So I will try to narrow down the build/ directory even further using |
This issue relates to the following bmuschko/gradle-docker-plugin#432
The Docker Gradle plugin is using the docker-java library in version 3.0.12. When using the plugin in a Gradle build under Windows the following exception occurs (only snippet):
The
IOException
tells me that someone has locked a file the library wants to use and include in the context TAR file. But this bug only happens under Windows, when I run the exact same build on my Mac everything is OK.Any ideas how to analyse / fix this? If you need a project to reproduce the behaviour, you can use https://github.com/lreimer/everything-as-code
The text was updated successfully, but these errors were encountered: