Limited time when using local cache in AWS CodeBuild?

安稳与你 提交于 2021-01-27 07:03:38

问题


I am trying to use the Docker layer cache in AWS CodeBuild. I have seen the effect when using it to reduce the time when building or pulling Docker image, but I found that it can only use local cache in a certain time period (about less than 1 hour). I have not seen any document about this.

Where did I get confused or do I have a way to set up the cache storage time?

Build caching in CodeBuild


回答1:


Local cache modes are best effort. They are available for a limited time after the build finishes. The S3 cache option for your artifacts are more durable, but they likely aren't well suited for Docker layers. We don't have documentation on it, as your mileage may vary.

If you run sparse builds, you are unlikely to see the benefits with local caching of your Docker layers. You may instead save and restore layer in Amazon ECR from your build container: https://github.com/aws/aws-codebuild-docker-images/issues/26#issuecomment-370177343.

In a future release, we will enable you to opt for backing up layers in your ECR registry.



来源:https://stackoverflow.com/questions/56710964/limited-time-when-using-local-cache-in-aws-codebuild

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!