Skip to content

Mounting secret with required works dockerfile:1.2 breaks in dockerfile:1.3 #2293

@sindreij

Description

@sindreij

This command breaks in 1.3, but works using # syntax = docker/dockerfile:1.2:

RUN --mount=type=secret,id=poetry_secret,required,dst=/root/.config/pypoetry/auth.toml poetry install

The error:

--------------------
  21 | >>> RUN --mount=type=secret,id=poetry_secret,required,dst=/root/.config/pypoetry/auth.toml poetry install
  22 |
--------------------
error: failed to solve: dockerfile parse error on line 21: unexpected key 'required' for mount type 'bind'

Command used to build:

buildctl build --frontend=dockerfile.v0 --opt filename=Dockerfile --local context=. --local dockerfile=. --secret id=poetry_secret,src=poetry.txt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions