Closed acarapetis closed 1 month ago
I meet the same issue I have no /var/lib/mysql before.
My with docker-compose.yml:
services:
db:
image: mysql
volumes:
- /var/lib/mysql:/var/lib/mysql
(.venv) [root@phuongl 1.9.6]# docker-compose -f docker-compose.yml up
[+] Running 11/11
✔ db Pulled
[+] Running 0/0
[+] Running 1/1default Creating
✔ Network 196_default Created
⠋ Container 196-db-1 Creating
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /var/lib/mysql
but with v2.29.2 directory "/var/lib/mysql" will auto create.
mount API exists in docker engine for a while, I wonder it is not supported by bitbucket. The bind API is legacy which comes with many limitations. We rely on mount API as compose file syntax offers fine grained support of bind mounts which is only available with this newer API.
@phuongl-ampere can you please open a dedicated issue ?
We had to pin the image in the runner to docker:27.1.2 wich runs the older compose.
Until bitbucket sorts their end in 2027 (or circa) hahahaha
Can you test with the latest v2.29.7
release please?
Confirmed fixed in v2.29.7 :)
Description
First of all, apologies for the framing here - I don't know enough about the Docker API to understand what the real problem is here, and calling this a bug is probably wrong.
Since upgrading our pipelines runner image to use compose v2.29.3, attempting to run a compose configuration that uses bind mounts in Bitbucket Pipelines is producing this error:
Error response from daemon: authorization denied by plugin pipelines: --mounts is not allowed
I'm guessing the relevant change here is #12078, and the problem is that compose has switched to using a new API for mounts that Bitbucket does not support.
Is there a way to revert to using the old API for bind mounts? Or do we just need to pin v2.29.2 for the foreseeable future?
Steps To Reproduce
Push to a Bitbucket Cloud repository.
Compose Version
Docker Environment
Anything else?
No response