Buildx: What exactly can cache from and cache to do with remote registries (self own custom registries)?

Created on 5 Nov 2020  路  4Comments  路  Source: docker/buildx

So from the documentation here https://github.com/docker/buildx#--cache-fromnametypetypekeyvalue

obviously a good point about docker is the layer caching, when you specify a remote for the cache from and cache to, two questions

  1. Is that for the layer caching as well?
  2. can you just specify the remote registry? or does it need to be remote registry and image name...
question

Most helpful comment

  1. Yes remote caching is for layers/instructions
  2. You need to specify image name where you are importing from/exporting to

All 4 comments

  1. Yes remote caching is for layers/instructions
  2. You need to specify image name where you are importing from/exporting to

Thanks for that, do you always need to do docker buildx build or can the commands be forwarded through to docker build ? I'm immediately guessing, absolutely not. But just thought I would clarify

DOCKER_BUIDLKIT=1 docker build can import cache and supports creating images with inline cache. docker buildx install can replace the docker build with docker buildx build

So when you say docker buildx install reeplaces docker build what does that mean for the arguments that you usually pass to buildx, how they interpreted by docker build or how do you take advantage of the --cache-from --cache-to

Was this page helpful?
0 / 5 - 0 ratings