Skaffold: Skaffold --cache-artifacts should check remote registry instead of local

Created on 29 May 2019  路  2Comments  路  Source: GoogleContainerTools/skaffold

Expected behavior

Do not rebuild the docker image when it is cached on remote docker registry even you don't have the cached image on local

Actual behavior

Rebuild the docker images regardless of the state on remote registry. If you have the cached image removed from your local, skaffold will trigger a full build

Information

  • Skaffold version: version0.28 and 0.30
  • Operating system: MacOS
  • Contents of skaffold.yaml:
apiVersion: skaffold/v1beta9
kind: Config
build:
  artifacts:
    - image: myimage
      docker:
        dockerfile: Dockerfile
        target: stage1
  local:
    useDockerCLI: false
    useBuildkit: false

Steps to reproduce the behavior

  1. skaffold build --cache-artifacts --default-repo x.y.z:5000 --insecure-registry x.y.z:5000, i can see the cache image has been pushed to my remote registry
  2. docker rmi -f $(docker images -aq)

  3. skaffold build --cache-artifacts --default-repo x.y.z:5000 --insecure-registry x.y.z:5000 again:

Checking cache...
 - myimage: Not found. Rebuilding.

in step 3, i can see that a new cache image with the same tag has been pushed to my remote registry again

arecache help wanted kinbug prioritp1

Most helpful comment

I have this issue when using gcr.io as remote container registry. I get

Checking cache...
 - myimage: Not found. Rebuilding.

although my image hasn't changed

All 2 comments

Hey @zodiac1214 this should be fixed with #2470! I'm going to go ahead and close this issue, but if you're still seeing this bug please reopen or leave us a comment. Thanks!

I have this issue when using gcr.io as remote container registry. I get

Checking cache...
 - myimage: Not found. Rebuilding.

although my image hasn't changed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

heroic picture heroic  路  4Comments

Hudsonzp picture Hudsonzp  路  4Comments

garvincasimir picture garvincasimir  路  4Comments

stanislav-zaprudskiy picture stanislav-zaprudskiy  路  4Comments

woodcockjosh picture woodcockjosh  路  4Comments