Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 965
Délisson Junio Avatar asked Aug 08 '16 20:08

Délisson Junio


1 Answers

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/

like image 174
chingc Avatar answered Sep 21 '22 05:09

chingc