-
Notifications
You must be signed in to change notification settings - Fork 1k
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
awaitImageId() using BuildImageResultCallback issue #2184
Comments
Just ran into this via https://github.com/bmuschko/gradle-docker-plugin, also using pip. My proposed solution was going to be to tweak onNext to null out Lines 69 to 79 in 1bac81f
could instead be private String getImageId() {
if (error != null) {
throw new DockerClientException("Could not build image: " + error);
}
if (imageId != null) {
return imageId;
}
throw new DockerClientException("Could not build image");
} |
This patch ensures that if the docker build commands result in logging the string "Successfully built", the callback from that build will still fail if there was an error in building. Fixes docker-java#2184
We used the api to build a model that installs pip dependencies for a python application.
Running the pip install outputs "Sucessfully built <package" for packages that are built.
This caused the api to return the name due to the implementation of parsing the imageId in the BuildImageResultCallback class.
We fixed it by adding a lastStepDone boolean that waits for Step n/n done and then enables the imageId parsing by waiting for "Sucessfully built <...>"
Should I open a pr with our solution I think there is no disadvantage to wait for docker image build completion before parsing the image id?
The text was updated successfully, but these errors were encountered: