Hello, i'm running a pipeline that looks like this:
options: docker: true
- step: name: test
- docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d
- docker-compose -f docker-compose.yml -f docker-compose.dev.yml exec web ./test all
- docker-compose -f docker-compose.yml -f docker-compose.dev.yml down -v
but i get the following error:
Image for service web was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating build_db_1 ...
Creating build_db_1 ... error
ERROR: for build_db_1 Cannot create container for service db: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories
ERROR: for db Cannot create container for service db: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories
Encountered errors while bringing up the project.
my docker-compose file contains a DB service that looks like this:
Any idea on what is this problem exactly about or how to fix it? the descfription does not make sense to me at all
It looks like the issue here is with the pgdata_folder, try adding a ./ prefix to it so the volume list looks like:
Pipelines restricts docker from mounting volumes from outside of the $BITBUCKET_CLONE_DIR directory. I did some experimentation and found that without the ./ (current directory) prefix, the pgdata_folder was being mounted from under a docker owned location, outside of $BITBUCKET_CLONE_DIR.
Check out this workaround, it's hack for sure, but it might get you unstuck: https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-pipelines-How-can-I-share-a-volume-between-two/qaq-p/1212083#M56779
We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events