question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DockerClientException: Could not build image: null when tagging an image

See original GitHub issue

It looks like the BuildResponseItem in isBuildSuccessIndicated() looks for BUILD_SUCCESS = "Successfully built"; but since I tag my image, my last getStream() value is “Successfully tagged test:latest”.

Code : String imageId = docker.buildImageCmd(pathServ.toFile()).withTag("test").exec(callback).awaitImageId();

Log :

08/06-14:25:59[VERBOSE]DockerBuildPhase$1#onNext:57// BuildResponseItem[stream= ---> 8cfc9e9191ff
,status=<null>,progressDetail=<null>,progress=<null>,id=<null>,from=<null>,time=<null>,errorDetail=<null>,error=<null>,aux=<null>]

08/06-14:25:59[VERBOSE]DockerBuildPhase$1#onNext:57// BuildResponseItem[stream=Successfully built 8cfc9e9191ff
,status=<null>,progressDetail=<null>,progress=<null>,id=<null>,from=<null>,time=<null>,errorDetail=<null>,error=<null>,aux=<null>]

08/06-14:25:59[VERBOSE]DockerBuildPhase$1#onNext:57// BuildResponseItem[stream=Successfully tagged test:latest
,status=<null>,progressDetail=<null>,progress=<null>,id=<null>,from=<null>,time=<null>,errorDetail=<null>,error=<null>,aux=<null>]

08/06-14:25:59[ ERROR ]Error uncaught// com.github.dockerjava.api.exception.DockerClientException: Could not build image: null
	at com.github.dockerjava.core.command.BuildImageResultCallback.getImageId(BuildImageResultCallback.java:71)
	at com.github.dockerjava.core.command.BuildImageResultCallback.awaitImageId(BuildImageResultCallback.java:48)
	at com.ic2.builder.phases.docker.DockerBuildPhase.go(DockerBuildPhase.java:61)
	at com.ic2.builder.PhasedBuilder.go(PhasedBuilder.java:133)
	at com.ic2.builder.EntryPoint.main(EntryPoint.java:17)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
KostyaShacommented, Jun 8, 2017

Try latest version before creating issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An image does not exist locally with the tag: while pushing ...
You need to tag and push the image. When tagging an image, you can use the image identifier (imageId). It is listed when...
Read more >
DockerBuildImage (gradle-docker-plugin 6.7.0 API)
The images including repository, image name and tag to be built e.g. ... When true , do not use docker cache when building...
Read more >
com.github.dockerjava.api.command.PullImageCmd Java ...
You may check out the related API usage on the sidebar. Example #1 ... thenThrow(new NotFoundException("Image not found")); // Array to make it...
Read more >
com.github.dockerjava.api.command.InspectImageCmd java ...
private void putImageInRegistry() throws InterruptedException { // It doesn't matter which image we use for this test, but use one that's likely to...
Read more >
Docker COPY failed: stat no source files were specified - Jhooq
... COPY command then you might see little different error message .i.e. ADD failed : No such file/Directory while building docker image.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found