You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm deploying my dockerized Django app using bitbucket pipelines but unfortunately, the pipeline already creates two containers but not the last one the error and my files are attached below.
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.
version: "3.8" services: db: container_name: db image: "postgres" restart: always volumes: - postgres-data:/var/lib/postgresql/data/ app: container_name: app build: context: . restart: always volumes: - static-data:/vol/web depends_on: - db proxy: container_name: proxy build: context: ./proxy restart: always depends_on: - app ports: - 80:8000 volumes: - static-data:/vol/static volumes: postgres-data: static-data:
image: python:3.7.2 pipelines: default: - step: services: - docker caches: - docker - pip script: - pip install docker-compose - docker-compose -f docker-compose-deploy.yml up --build - pipe: atlassian/aws-code-deploy:0.2.5 variables: AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY COMMAND: 'upload' APPLICATION_NAME: $APPLICATION_NAME ZIP_FILE: 'application.zip' S3_BUCKET: $S3_BUCKET VERSION_LABEL: 'my-app-2.0.0' - pipe: atlassian/aws-code-deploy:0.2.5 variables: AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY COMMAND: 'deploy' APPLICATION_NAME: $APPLICATION_NAME DEPLOYMENT_GROUP: $DEPLOYMENT_GROUP WAIT: 'true' S3_BUCKET: $S3_BUCKET VERSION_LABEL: 'my-app-2.0.0' IGNORE_APPLICATION_STOP_FAILURES: 'true' FILE_EXISTS_BEHAVIOR: 'OVERWRITE' definitions: services: docker: memory: 3072
Hi @Zain Khan and welcome to the community!
Based on the error message and the files you included here, I believe the error is caused by the path where you are mounting the volumes. At the moment, we don't support mapping volumes outside of $BITBUCKET_CLONE_DIR:
We've had to restrict a few for security reasons, including Docker swarm-related commands, docker run --privileged, docker run --mount, and mapping volumes with a source outside $BITBUCKET_CLONE_DIR.
Volumes will need to be mounted inside $BITBUCKET_CLONE_DIR (/opt/atlassian/bitbucketci/agent/build/.* or /opt/atlassian/pipelines/agent/build/.*)