DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose build does not work
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose build php-fpm
Building php-fpm Sending build context to Docker daemon 12.73MB ..... Step 7/39 : RUN --mount=type=cache,target=/var/cache/apk set -ex && apk add --update-cache $PHPIZE_DEPS the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled ERROR: Service 'php-fpm' failed to build : Build failed
Docker desktop version 3.3.3 (64133) Engine: 20.10.6 Docker compose: 1.29.1 config.json { "registry-mirrors": [], "insecure-registries": [], "debug": true, "experimental": true, "features": { "buildkit": true } }
run under wsl2 Ubuntu 18.04
I had a similar issue with 1.27.4 within crostini on chrome OS, but upgrading to 1.29.2 seems to have resolved it (you can see the new buildkit output format, and the mount step doesn't throw that error)
I too had a similar issue (was using version 1.17), and after upgrading to 1.29.2 I am good to go.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Compose v1 is deprecated and will be End of Life in a few months. You should switch to Compose v2
"the --mount option requires BuildKit" - check your docker daemon has buildkit enabled.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm closing this issue as obsolete: Docker Compose V1 has reached end-of-life and we are not accepting any more changes. Please try and reproduce your issue with Compose V2 and create a new issue or PR with the relevant Compose V2 information.