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

Upgrade Docker-Java because of Docker 17.x #348

Closed
aniketbhatnagar opened this issue May 29, 2017 · 3 comments
Closed

Upgrade Docker-Java because of Docker 17.x #348

aniketbhatnagar opened this issue May 29, 2017 · 3 comments
Labels
Milestone

Comments

@aniketbhatnagar
Copy link
Contributor

aniketbhatnagar commented May 29, 2017

See docker-java/docker-java#830

Basically, Docker changed the output message when an image was successfully built.

We should switch to 3.0.10.

Stack trace:

org.testcontainers.containers.ContainerFetchException: Can't get Docker image name from org.testcontainers.images.builder.ImageFromDockerfile@5536379e
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:739)
at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:278)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:162)
Caused by: org.testcontainers.shaded.com.github.dockerjava.api.exception.DockerClientException: Could not build image: null
at org.testcontainers.shaded.com.github.dockerjava.core.command.BuildImageResultCallback.getImageId(BuildImageResultCallback.java:71)
at org.testcontainers.shaded.com.github.dockerjava.core.command.BuildImageResultCallback.awaitImageId(BuildImageResultCallback.java:48)
at org.testcontainers.images.builder.ImageFromDockerfile.resolve(ImageFromDockerfile.java:146)
at org.testcontainers.images.builder.ImageFromDockerfile.resolve(ImageFromDockerfile.java:31)
at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:20)
at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:27)
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:737)
at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:278)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:162)

Mainly because Successfully tagged supersedes Successfully built:

2017-05-29 10:15:47 [dockerjava-netty-1-1] DEBUG o.t.s.c.g.d.c.c.BuildImageResultCallback - BuildResponseItem[stream=Successfully built 52e0fb63dc23
,status=,progressDetail=,progress=,id=,from=,time=,errorDetail=,error=,aux=]
2017-05-29 10:15:47 [dockerjava-netty-1-1] DEBUG docker[testcontainers/pxapxvrxbpjsquuq] - Successfully built 52e0fb63dc23
2017-05-29 10:15:47 [dockerjava-netty-1-1] DEBUG o.t.s.c.g.d.n.NettyDockerCmdExecFactory$1 - [id: 0xcc487959, L:null - R:/var/run/docker.sock] RECEIVED: DefaultHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 75, cap: 75/75, unwrapped: PooledUnsafeDirectByteBuf(ridx: 81, widx: 81, cap: 272)), decoderResult: success), 75B
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 7b 22 73 74 72 65 61 6d 22 3a 22 53 75 63 63 65 |{"stream":"Succe|
|00000010| 73 73 66 75 6c 6c 79 20 74 61 67 67 65 64 20 74 |ssfully tagged t|
|00000020| 65 73 74 63 6f 6e 74 61 69 6e 65 72 73 2f 70 78 |estcontainers/px|
|00000030| 61 70 78 76 72 78 62 70 6a 73 71 75 75 71 3a 6c |apxvrxbpjsquuq:l|
|00000040| 61 74 65 73 74 5c 6e 22 7d 0d 0a |atest\n"}.. |
+--------+-------------------------------------------------+----------------+
2017-05-29 10:15:47 [dockerjava-netty-1-1] DEBUG o.t.s.c.g.d.c.c.BuildImageResultCallback - BuildResponseItem[stream=Successfully tagged testcontainers/pxapxvrxbpjsquuq:latest
,status=,progressDetail=,progress=,id=,from=,time=,errorDetail=,error=,aux=]

@bsideup
Copy link
Member

bsideup commented May 29, 2017

Hi @aniketbhatnagar,

Thanks for reporting!

Do you want to contribute this change? It should be a one-liner (see the property in pom.xml)

@bsideup bsideup added this to the 1.3.0 milestone May 29, 2017
@aniketbhatnagar
Copy link
Contributor Author

Yup. PR coming shortly.

@aniketbhatnagar
Copy link
Contributor Author

Tested with version 1.3.0 and found fixed

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

No branches or pull requests

2 participants