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
We've observed an issue affecting users of Testcontainers and Docker 18.06 on Mac, whereby our attempts to copy a file from a container would fail (producing zero-length or corrupt data).
We believe that we've traced it back to the following causes:
docker-java’s NettyInvocationBuilder sets an outgoing Accept-Encoding: gzip header. Until very recently docker was not actually doing anything with this header - i.e. not producing a compressed response
AFAICT, despite the Accept-Encoding request header, there is no code in docker-java to actually decompress responses
It seems to me that a simple fix is to add channel.pipeline().addLast(new HttpContentDecompressor()) in the right places in NettyInvocationBuilder. If this works for us (and our forked version of this class), I'll contribute a PR back to docker-java.
We've observed an issue affecting users of Testcontainers and Docker 18.06 on Mac, whereby our attempts to copy a file from a container would fail (producing zero-length or corrupt data).
We believe that we've traced it back to the following causes:
NettyInvocationBuildersets an outgoingAccept-Encoding: gzipheader. Until very recently docker was not actually doing anything with this header - i.e. not producing a compressed responseAccept-Encodingrequest header, there is no code in docker-java to actually decompress responsesIt seems to me that a simple fix is to add
channel.pipeline().addLast(new HttpContentDecompressor())in the right places inNettyInvocationBuilder. If this works for us (and our forked version of this class), I'll contribute a PR back to docker-java.