spec icon indicating copy to clipboard operation
spec copied to clipboard

Better support pre-builts with an image base

Open Clockwork-Muse opened this issue 1 year ago • 1 comments

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:

{
    "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.

Clockwork-Muse avatar Oct 07 '24 23:10 Clockwork-Muse

Sounds good to me.

Sent from Yahoo Mail for iPhone

On Monday, October 7, 2024, 6:56 PM, Stephen A. Imhoff @.***> wrote:

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: { "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.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Tkelley325 avatar Oct 23 '24 00:10 Tkelley325