I am attempting to run Docker Compose on Bitbucket Pipeline, and I came across this code on Stack Overflow (https://stackoverflow.com/questions/72744395/how-to-use-docker-compose-v2-in-bitbucket-pipelines) that seems promising. However, upon running it, I encounter the following error:
Error response from daemon: authorization denied by plugin pipelines: --privileged=true is not allowed
In my search for a solution, I came across this Atlassian Confluence page: https://confluence.atlassian.com/bbkb/docker-buildkit-error-in-pipelines-when-deploying-to-google-cloud-1235859715.html
Unfortunately, the suggested solution provided on the Confluence page did not resolve the issue. Even after adding the line:
export PATH=/usr/bin:$PATH
I observed no changes. Additionally, altering the DOCKER_BUILDKIT
variable did not work with my Docker Compose in version 24.
Is there any functional example of Docker Compose in Bitbucket Pipeline that you can recommend? I appreciate any assistance you can provide.
Hi @Dawid Cichoń and welcome to the community!
For Pipelines builds that run on Atlassian's infrastructure we've had to restrict certain docker options. You can find details on the documentation below:
--privileged is one of the options we have restricted. Are you using privileged: true in your docker-compose.yml file?
The Confluence article you found is specific only to some Docker images that are used as build containers.
If you'd like me to investigate further your specific issue, I would need to know the content of your bitbucket-pipelines.yml file and the content of your docker-compose.yml.
The restrictions on the documentation page I shared do not apply to builds running on a self-hosted runner. If you have your own machine where you can run builds, you could also look into using one of our self-hosted runners:
Please feel free to let me know if you have any questions.
Kind regards,
Theodora
image: docker:20.10.8
pipelines:
default:
- step:
name: Build and deploy
script:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker-compose build
- docker-compose push
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, I checked it and it kinda works.
When I do docker compose up I get this error: Error response from daemon: authorization denied by plugin pipelines: --mounts is not allowed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.