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?

  • Deis docker image deploy
  • Cannot SSH using private key while building Docker image
  • VOLUME command in docker image is using custom-volume driver
  • Docker Container to Host Routing
  • Clear all entries in Docker mongodb?
  • Some paths of cgroup of a docker container are missing
  • Alternatively, should I be using a different process to deploy?

  • Docker return codes from background commands
  • Can't connect to ElasticSearch Docker cluster which run on local virtual machine using Java API
  • Azure vm docker create cannot find certificate 'ca.pem'
  • How to persist data in a dockerized postgres database using volumes
  • Build container with docker-compose, but run /etc/bash with -it option later?
  • Selenium Only local connections allowed and NoSuchSessionException
  • 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.