TL;DR
I'm building an ASP.NET app using docker build
; when I run the build on my local machine, it quickly executes because I'm making use of the Build cache.
Step 1/10 : FROM microsoft/aspnetcore-build:2.0.0 as identity-build
---> c5549d4c5716
Step 2/10 : ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
---> Using cache
---> 060911817d8c
Step 3/10 : WORKDIR /publish
---> Using cache
---> 851e87c05c42
I'm trying to do the same on an AppVeyor CI, but because AppVeyor gives me a clean VM image for every build, there is no cache.
I've tried experimenting with pulling the build images from a private container repository, but this does not seem to "rehydrate the image cache", as a result, there are no cache hits.
Background
I've created an example GitHub repo, and an associated build in AppVeyor with which I'm experimenting.
I've tried to restore the build images from a private container repository, but this has not resulted in any cache hits.
I'm trying to achieve two objectives by using the docker build cache.
- Faster builds.
- Determine whether the code has changed and use this to decide whether a deployment is necessary.
First of all, I'm just trying to get the build cache rehydrated, and continue experimenting from there.