I have a Dockerfile and I'm building container image on Google Cloud Build (GCP) using Kaniko.
About my Dockerfile
The Dockerfile has 4 stages (Multi-Stage Build).
And there are 13 RUN
or COPY
steps in the Dockerfile.
Current build speed.
Kaniko on GCP
- Full build on Kaniko: about 10minutes.
- Rebuild without code change: about 3~4 minutes
docker build on my local Mac
- Full build: About 6 min 58 sec.
- Rebuild without code change: 3.48 sec.
Question
I'd like to try to decrease the count of cache pulling and cache saving if Kaneko can do it.
Kaniko looks don't have an option to take snapshots by each docker build stage. (not each step) https://github.com/GoogleContainerTools/kaniko/blob/master/README.md
Does anyone know a solution?
Otherwise, Do you have an idea about suppress cache pulling/cache saving overhead?