Skip to content

buildkit and experimental frontend #817

@astorath

Description

@astorath

We are using ONBUILD options in our multistage builds. For instance:

FROM my.company.com/ci/dotnet:v1-build as build
FROM my.company.com/ci/dotnet:v1-runtime
FROM base:v1
WORKDIR /src
ONBUILD COPY . /src
ONBUILD make clean all
FROM runtime:v1
WORKDIR /app
ONBUILD COPY --from=build /src/target /app

We wanted to use # syntax = docker/dockerfile:1.0-experimental frontend for mount=type=cache options in our build container, but because COPY command is inside ONBUILD statement, buildkit requires to set experimental on main dockerfiles.

This is not very convenient, as we would have to update all our dockerfiles over all projects (which is avoided with the use of ONBUILD instructions).

Is there a workaroud for this? Maybe some kind of global option to set experimental frontend as default?

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