Skip to content

Question: How is docker run cache handled across rebuilds #482

Description

@nmiculinic

For example I have the following lines in the dockerfile:

RUN --mount=type=cache,target=/go/pkg/mod go mod download
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg/mod CGO_ENABLED=0 go build -ldflags "${LDFLAGS}" -o app ./cmd/controlplane

How are those cache lines handled across rebuilds? I'm missing details in the documentation to understand what's happening.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions