Skip to content

Support caching behavior by path #787

@mthalman

Description

@mthalman

Currently the build infra has a single setting which can be used to disable the image caching behavior: noCache = true. Since the scope of that variable applies to all the Dockerfiles included in the build, it can end up including Dockerfiles that should take advantage of caching.

As an example, if dotnet/dotnet-docker#1455 were to be implemented, there could be scenarios where a package update is necessary in the sdk image, such as curl. In that case a build would be queued with caching disabled. Only the sdk image actually needs to get rebuilt but because caching is disabled, it would cause the entire image hierarchy (runtime-deps, runtime, aspnet) to also get rebuilt. This is unnecessary and wasteful both for build time and image storage. Having a way to indicate that caching should only be disabled for the sdk Dockerfile would solve this issue.

Are there other scenarios outside of dotnet/dotnet-docker#1455 where this functionality could be useful or should it just be considered as part of the implementation for that issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions