devcontainers/devcontainers.github.io

Close #563

Opened this issue · 2 comments

Close #563

I added --cache-to option to devcontainer build command.

If buildx is used for building image, we can pass --cache-to option in order to export and reuse buildx cache.

Checks

  • Create docker-container driver builx builder
    • docker buildx create --driver=docker-container --use
  • Build with --cache-to option
    • node devcontainer.js build --workspace-folder . --cache-to=type=local,dest=/tmp/build-cache
  • Confirm cache directory exists
    • ls /tmp/build-cache
❯ ls /tmp/build-cache
blobs  index.json  ingest  oci-layout

Originally posted by @yokonao in devcontainers/cli#570

Merge

Looks like this was created by accident, closing. If needed, feel free to reopen with more details, thank you!