You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docker InternalServerErrorException: "archive/tar: cannot encode header: filename may not have trailing slash" #680
com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"archive/tar: cannot encode header: filename may not have trailing slash"}
Switching to docker stable channel fixed the issue, not sure if this is a docker bug or an incompatibility with the latest version
FROM postgres:9.6
RUN apt-get update && apt-get -y install postgresql-plperl-9.6
and no, I didn't report anything else as I'm not sure where the actual issue lies. I'm using the edge channel for a long time and the issue seems to have started when I got the last update a few days ago
I had a similar issue - I updated to 18.05.0-ce-rc1-mac63 (24246) and then my previously-working tests started returning:
com.github.dockerjava.api.exception.DockerClientException: Could not pull image: Network timed out while trying to connect to https://index.docker.io/v1/repositories/bsideup/moby-ryuk/images. You may want to check your internet connection or if you are behind a proxy.
I'm not sure how helpful it will be, but I'm going to open an issue with docker to let them know about this issue with the rc1
changed the title [-]Unable to start postgres container on docker 18.05.0-ce-rc1-mac63 (24246)[/-][+]Unable to start postgres container on docker 18.05.0-ce (24246)[/+]on May 25, 2018
changed the title [-]Unable to start postgres container on docker 18.05.0-ce (24246)[/-][+]Unable to start postgres container on docker 18.05.0-ce[/+]on May 25, 2018
The issue still exists in the latest edge release (Version 18.05.0-ce-mac66 (24545))
13:11:11.423 [main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
13:11:11.942 [main] INFO org.testcontainers.dockerclient.UnixSocketClientProviderStrategy - Accessing docker with local Unix socket
13:11:11.942 [main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
13:11:11.943 [main] INFO org.testcontainers.DockerClientFactory - Docker host IP address is localhost
13:11:12.087 [main] INFO org.testcontainers.DockerClientFactory - Connected to docker:
Server Version: 18.05.0-ce
API Version: 1.37
Operating System: Docker for Mac
Total Memory: 1998 MB
13:11:16.301 [main] INFO org.testcontainers.DockerClientFactory - Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
ℹ︎ Checking the system...
✔ Docker version should be at least 1.6.0
✔ Docker environment should have more than 2GB free disk space
✔ File should be mountable
13:11:16.730 [testcontainers-netty-1-12] ERROR com.github.dockerjava.core.async.ResultCallbackTemplate - Error during callback
com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"archive/tar: cannot encode header: filename may not have trailing slash"}
at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:109)
at com.github.dockerjava.netty.handler.HttpResponseHandler.channelRead0(HttpResponseHandler.java:33)
at org.testcontainers.shaded.io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at org.testcontainers.shaded.io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at org.testcontainers.shaded.io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
at org.testcontainers.shaded.io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at org.testcontainers.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at org.testcontainers.shaded.io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at org.testcontainers.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1342)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at org.testcontainers.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at org.testcontainers.shaded.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:934)
at org.testcontainers.shaded.io.netty.channel.kqueue.AbstractKQueueStreamChannel$KQueueStreamUnsafe.readReady(AbstractKQueueStreamChannel.java:593)
at org.testcontainers.shaded.io.netty.channel.kqueue.KQueueDomainSocketChannel$KQueueDomainUnsafe.readReady(KQueueDomainSocketChannel.java:131)
at org.testcontainers.shaded.io.netty.channel.kqueue.AbstractKQueueChannel$AbstractKQueueUnsafe.readReady(AbstractKQueueChannel.java:367)
at org.testcontainers.shaded.io.netty.channel.kqueue.KQueueEventLoop.processReady(KQueueEventLoop.java:198)
at org.testcontainers.shaded.io.netty.channel.kqueue.KQueueEventLoop.run(KQueueEventLoop.java:270)
at org.testcontainers.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at org.testcontainers.shaded.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
at java.lang.Thread.run(Thread.java:745)
changed the title [-]Unable to start postgres container on docker 18.05.0-ce[/-][+]Docker InternalServerErrorException: "archive/tar: cannot encode header: filename may not have trailing slash"[/+]on Jul 29, 2018
testcontainers version is 1.5.1
Docker version 18.03.0-ce, build 0520e24302
Do you have any common solution for that?
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image name from org.testcontainers.images.builder.ImageFromDockerfile@6eee2740
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:827)
at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:298)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:188)
... 39 more
Caused by: com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"archive/tar: cannot encode header: filename may not have trailing slash"}
Activity
bsideup commentedon May 3, 2018
Hi @guillaumesmo!
Oh wow, I hope that's a bug in rc1 o_O Did you report it to Moby project as well? I'm sure they will be happy to know about it :)
guillaumesmo commentedon May 3, 2018
Just for further clarification, I'm using the
constructor with the following Dockerfile
and no, I didn't report anything else as I'm not sure where the actual issue lies. I'm using the edge channel for a long time and the issue seems to have started when I got the last update a few days ago
ryangardner commentedon May 7, 2018
I had a similar issue - I updated to
18.05.0-ce-rc1-mac63 (24246)and then my previously-working tests started returning:com.github.dockerjava.api.exception.DockerClientException: Could not pull image: Network timed out while trying to connect to https://index.docker.io/v1/repositories/bsideup/moby-ryuk/images. You may want to check your internet connection or if you are behind a proxy.I'm not sure how helpful it will be, but I'm going to open an issue with docker to let them know about this issue with the rc1
kiview commentedon May 22, 2018
Hey @guillaumesmo, is this bug still persistent?
[-]Unable to start postgres container on docker 18.05.0-ce-rc1-mac63 (24246)[/-][+]Unable to start postgres container on docker 18.05.0-ce (24246)[/+][-]Unable to start postgres container on docker 18.05.0-ce (24246)[/-][+]Unable to start postgres container on docker 18.05.0-ce[/+]guillaumesmo commentedon May 25, 2018
The issue still exists in the latest edge release (Version 18.05.0-ce-mac66 (24545))
bsideup commentedon May 30, 2018
Hey @ryangardner, did you report it?
mikepii commentedon Jul 26, 2018
I ran into this issue too but unlike @guillaumesmo I'm on the stable Docker channel already (and Docker 18.06.0-ce)
rnorth commentedon Jul 29, 2018
We seems to be seeing this consistently with Docker 18.06.0-ce. Looking into it.
[-]Unable to start postgres container on docker 18.05.0-ce[/-][+]Docker InternalServerErrorException: "archive/tar: cannot encode header: filename may not have trailing slash"[/+]Fix #680: Ensure that tar entries for Dockerfile builder do not have …
jamieswogger commentedon Jul 30, 2018
I'm running on docker 18.06.0 and ran into a similar issue:
Just noting that Fix 680 also solves this issue
SirheiNichyparuk commentedon Nov 20, 2018
Hi,
We still see this error.
testcontainers version is 1.5.1
Docker version 18.03.0-ce, build 0520e24302
Do you have any common solution for that?
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image name from org.testcontainers.images.builder.ImageFromDockerfile@6eee2740
at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:827)
at org.testcontainers.containers.GenericContainer.logger(GenericContainer.java:298)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:188)
... 39 more
Caused by: com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"archive/tar: cannot encode header: filename may not have trailing slash"}
bsideup commentedon Nov 20, 2018
Hi @SirheiNichyparuk,
Well, I would say that the common solution for that is to keep your dependencies up-to-date :)
You're using Testcontainers 1.5.1 and it is 1 year old (note "288 commits to master since this release" ;) ):
https://github.com/testcontainers/testcontainers-java/releases/tag/1.5.1
Try 1.10.1 (latest), and the issue will be gone :)