Délisson Junio
Délisson Junio

Reputation: 1308

Is there a way to pre-compress docker images before pushing?

I'm in the progress of pushing some docker images through the internet to our host. Seeing as Docker compresses the images on the fly, and the CLI reports total image size before compression, I used nethogs to watch the uploading progress - It seemed to be stalling because of compression, as the upload speeds were way below where I expected them to be.

I expect to be uploading this image quite a few times - Is there a way I can cache Docker's compressed image and just push it through later?

Upvotes: 9

Views: 4963

Answers (1)

user4399354
user4399354

Reputation:

According to the documentation the data is compressed before upload automatically.

Progress bars are shown during docker push, which show the uncompressed size. The actual amount of data that’s pushed will be compressed before sending, so the uploaded size will not be reflected by the progress bar.

https://docs.docker.com/engine/reference/commandline/push/

Upvotes: 5

Related Questions