Store different dockers in the cache built in parallel steps

Issue #16761 resolved
Arik Yelovitch
created an issue

Be able to name thr dockers in order to be able and cache different dockers that are built in parallel steps.

Comments (4)

  1. Arik Yelovitch reporter

    Sure thing,

    I have 2 parallel steps (soon to be 3) that build dockers for different modules we have to deploy on our servers. In the current configuration I can store only one docker in the cache and by that save more than 50% of the build time. But it useless since I always wait for the other job to do the build from scratch.

    On top of that, I would like to sperate different caches for production deploy and for the staging one (just to be safe).

    Thank you, Arik

  2. Raul Gomis staff

    Hi @Arik Yelovitch,

    Thanks for sharing your use case. At the moment, docker layers caching is limited to 1GB compressed and only one parallel step would generate a cache if you run them in parallel.

    In Docker 1.13, the docker build command introduced a new option --cache-from, which allows to specify one or more tagged images as a cache source. The image generated in the build can also be used as a cache source in another Docker build. This might help to improve the performance of your build and save build time.


    docker build \
      --cache-from $IMAGE:latest \
      --tag $IMAGE:latest \


  3. Log in to comment