devcontainers / devcontainers/spec

Better support pre-builts with an image base

Open
#505 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
5.7k
Forks
496
PR merge metrics
No merged PRs in 30d

Description

Currently, when creating a devcontainer, both the dockerfile-based build and the compose-based build can take advantage of docker's ability to pull cache from OCI registries (by using the name of the final pushed image) to potentially speed up the container build. This is possibly superior to pre-building based off of a separate devcontainer definition, since then you're only maintaining a single file.

Unfortunately, this isn't available at all for image-based builds.
It would be nice if there was a cache-from option available for image-based builds, similar to dockerfile-based builds, something like:

```json
{
"image": "some-image-that-has-most",
// This would be new
"cacheFrom": "pushed-image-version",
"features": {
"somethingExpensive": {
},
}
}
```

This would make setup potentially simpler for some use cases.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.