Deploying with docker push is slow because there are many images

I’m trying to deploy via docker. I’m using the following workflow:

  1. Build locally
  2. Push my image to docker hub
  3. On the server: pull the image
  4. On the server: start the image

But docker push takes FOREVER. There are like 30 images, and it has to walk through each one and say “Image already exists”. Is there any way to speed this up?

  • Docker interactive mode and executing script
  • Persistent easily-accessible storage in Docker
  • How to set a time limit for a Kubernetes job?
  • Elastic Beanstalk sending invalid commands to docker
  • Mounting a Laravel's .env file into a Docker container
  • Pull Docker from my private docker-registry without specifying the host
  • Alternatively, should I be using a different process to deploy?

  • How with Vagrant, ansible and docker to get Linux dev machine as close as possible to production
  • mysql in docker container can't run through a mounted volume on os x
  • Connect RabbitMQ container from another container
  • Docker image is not visible when I run docker ps
  • run docker under supervisor, can not enable tty error
  • When running an installation of Docker on Centos 7, I run into an error
  • 3 Solutions collect form web for “Deploying with docker push is slow because there are many images”

    If you’re using a local registry, we recently added a redis cache which has helped speed things up tremendously. Details about how to do this are on the registry github page

    While pushing still takes time on new images, pulls are very fast, as all layers are in the redis cache.

    The most likely reason why you are pushing more/large layers of your images on every deployment is that you have not optimized your Dockerfiles. Here is a nice intro

    If you are pushing on AWS ECR, like I was, it may be that docker on your local needs to restart. See thread about AWS ECR slowness:

    This may affect other platforms as well. It seems that around 1.12.1 on Mac, anyhow, there are some slowness issues that go away with a restart of Docker.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.