bmuschko / gradle-docker-plugin

Gradle plugin for managing Docker images and containers.
https://bmuschko.github.io/gradle-docker-plugin/current/user-guide/
Apache License 2.0
1.23k stars 362 forks source link

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

Open shollander opened 3 days ago

shollander commented 3 days ago

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 .

bmuschko commented 1 day ago

The Docker remote API does not support buildkit as of now.