I’m really perplexed by this behavior.
When I export a docker container, the intermediate size is massive compared to the container size. For example a 20GB container with a base disk size of 64GB using devicemapper can sometimes result in 400GB being streamed via the Docker API.
This is the final progress bar of curl:
100 429G 0 429G 0 0 116M 0 --:--:-- 1:03:11 --:--:-- 24.4M
Something similar happens even if I use the command line. At one point I ran out of space in the middle of an export because
docker export <CONTAINER ID> -o <DESTINATION FILE>" created a 200GB file even though the container itself is 20GB. The intermediate file size varies from 100GB to 400GB. If it finishes, however, the final size is the same as the container size: 20GB.
Anyone know why this is happening? This happens both over command line and the Docker HTTP API.