3

So we've updated the dockerfile, and would like to build w/o using the old Kaniko Cache, but want to replace it at the same time.

How to force it to build new cache layers?

gcloud config set builds/use_kaniko True
gcloud beta builds submit --tag="gcr.io/${PROJECT_NAME}/${name}" --timeout="2h" --machine-type="n1-highcpu-32"
njho
  • 2,023
  • 4
  • 22
  • 37

1 Answers1

4

Turns out the --no-cache option will also replace the existing Kaniko cache

gcloud config set builds/use_kaniko True
gcloud beta builds submit --tag="gcr.io/${PROJECT_NAME}/${name}" --timeout="2h" --machine-type="n1-highcpu-32" --no-cache
njho
  • 2,023
  • 4
  • 22
  • 37