-
Suggestion
-
Resolution: Unresolved
-
None
Issue Summary
Using docker compose v2.29.3 or newer with mounted volumes is not working in Bitbucket Pipelines.
Steps to Reproduce
- Create a pipeline with the following YAML and docker compose definition:
services: my-service: image: alpine command: ["echo", "this is a test"] volumes: - .:/test
pipelines: default: - step: name: Testing pipelines with compose script: - docker compose run my-service services: - docker
- The step will fail with the error
Error response from daemon: authorization denied by plugin pipelines: --mounts is not allowed
Expected Results
The step should be executed successfully as in the previous version of compose (<= 2.29.2)
Actual Results
The pipeline step fails with the error
Error response from daemon: authorization denied by plugin pipelines: --mounts is not allowed
Workaround
- Downgrade compose to v2.29.2
or - Use a docker image that comes with compose <= 2.29.2 installed.
As per Infrastructure changes in Bitbucket Pipelines, we currently support Docker 25.0.2 (and Docker Compose 2.24.5), so strictly speaking this is not a bug.
We're in the process of making some changes to the build environment which will be less restrictive in terms of what you can run with Docker in Docker. I'm going to change this ticket to a feature request and put it in the backlog so that you can watch it, and we will update it once the new build environment is rolled out.