For Netty implementation DockerClient.copyFileFromContainerCmd().exec() and DockerClient.copyArchiveFromContainerCmd().exec() returns InputStream that skips all 0xFF bytes. This results in malformed downloaded tar archives.
Check HttpResponseStreamHandler.java:84 where current.readByte() may return -1 which for InputStream.read() means there is no more data because the end of the stream has been reached. Could be fixed with returning current.readByte() & 0xFF.