Deploying by pressing docker is slow because there are a lot of images

I'm trying to deploy through docker. I am using the following workflow:

  • Build locally
  • Click my image on the docker hub
  • On the server: pull out the image
  • On the server: run the image

But the docker push takes FOREVER. There are 30 images, and they must go through each and say, "The image already exists." Is there any way to speed this up?

Alternatively, should I use a different process for deployment?

+6
source share
3 answers

If you use a local registry, we recently added a redis cache, which helped to significantly speed up the work. Details on how to do this are on the github registry page

https://github.com/docker/docker-registry

When you click on new images again, pulling is very fast, since all layers are in the redis cache.

+4
source

If you click on AWS ECR, like me, it may happen that the dockers on your local computer must reboot. See the AWS ECR Slowness Section:

https://forums.aws.amazon.com/thread.jspa?threadID=222834

This may affect other platforms. It seems that around 1.12.1 on the Mac, anyway, there are some sluggishness issues that go away with rebooting Docker.

+3
source

The most likely reason you click more / larger layers of your images each time you deploy is because you did not optimize your Docker files. Here is a good entry http://blog.tutum.co/2014/10/22/how-to-optimize-your-dockerfile/ .

+2
source

Source: https://habr.com/ru/post/985898/


All Articles