Skip to content

RUN --mount=type=bind doesn't work #1226

@shollander

Description

@shollander

Expected Behavior

Use RUN --mount=type=bind to install dependencies in efficient manner. e.g. Dockerfile:

FROM python:3.12-slim
RUN --mount=type=bind,source=myapp,target=/tmp/myapp pip install /tmp/myapp

Current Behavior

Fails with the following error:

Could not build image: the --mount option requires BuildKit. Refer to https://doc.docker.com/go/buildkit ro learn how to build images with BuildKit enabled

Context

This Dockerfile works fine with command line docker build .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions