Leverage docker cache
See original GitHub issueWould it possible to add support for using docker cache?
Especially for PR validation, it would be great if it would be possible to specify a docker image that would be used for resolving layer cache. That image name would be passed to a docker build
option:
--cache-from strings Images to consider as cache sources
Also the image should be pulled from the registry first.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:23
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Leverage the Build Cache - The Beginners Guide to Docker
Learn to use build cache to optimize image build time. ... The build process used by Docker has the concept of a cache,...
Read more >Best practices for writing Dockerfiles - Docker Documentation
Leverage build cache . When building an image, Docker steps through the instructions in your Dockerfile , executing each in the order specified....
Read more >Docker Cache – How to Do a Clean Image Rebuild and Clear ...
Docker's build-cache is a handy feature. It speeds up Docker builds due to reusing previously created layers. You can use the --no-cache option ......
Read more >Fast Docker Builds With Caching (Not Only) For Python
One of our requirements was to leverage Docker cache also in CI/CD jobs which may not have local cache available. That's when external...
Read more >Reducing Docker image size (Docker Layer Caching)
Leveraging Docker Layer Caching. Multiple images built during our CI/CD process are based on the same image. We are using Docker Layer ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Note that though the backend image has been released I am still waiting on approval of the updated docs to release the action with the new input. Pushing to get this done ASAP.
Thank you for your contribution @appleboy
Can we have an example of how to use this option? Looking at the go code, it just adds the option to the build command, but that will do nothing when there is no local cache (ie a CB scenario like this). In my experience you need to pull the image first, so was hoping that this change did that as well. I did some testing with this action and was unable to get it to work which was consistent with that conclusion.
Edit: Tried several variations including
cache_froms: quay.io/${{ env.quayio_repo }}:${{ env.docker_cache_tag }}
with no success_Edit2: PR for utility in docker image https://github.com/docker/github-actions/pull/17_