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?

  • Apache docker container - Invalid command 'RewriteEngine'
  • When deploying a Docker container to AWS, do i need to deploy my own reverse proxy as well?
  • How to install Docker using .rpm files
  • How to monitor user activity on docker
  • Why there is no init / initctl on the docker centos image
  • Docker compose error with docker-engine version
  • Alternatively, should I be using a different process to deploy?

  • Is swarm required for using multi-host networking feature using overlay in docker
  • Host names are not set in docker compose
  • Is it possible to change the read-only/read-write status of a docker mount at runtime?
  • Dockerfile build error on RUN npm install
  • Is it possible to “mount” virtual CPU located in the cloud?
  • docker nginx load balancing not working with Azure
  • 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

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

    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 http://blog.tutum.co/2014/10/22/how-to-optimize-your-dockerfile/.

    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:

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

    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.