I keep getting error
ERROR: for build_composer_1 Cannot create container for service composer: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories
I have seen similar posts/errors to this one such as
but I cannot see a clear guideline on how to fix the error.
My build file
image: diegogullo/docker-image-extras
options:
docker: true
pipelines:
default:
- step:
script:
- ls -la
- pwd
- echo $BITBUCKET_CLONE_DIR
- make tests_ci
make tests_ci runs command
docker-compose -f docker-compose.ci.yml run --rm php5 bash -c "vendor/bin/phpunit --bootstrap app/protected/tests/bootstrap.php app/protected/tests/"
and the docker-compose.ci.yml is
version: '3.7'
services:
php5:
build: docker/php5
ports:
- "9000"
volumes:
- ./docker/config/php.ini:/usr/local/etc/php/php.ini
- websrc:/var/www/html/:z
depends_on:
- composer
environment:
- DB_DATABASE
- DB_USERNAME
- DB_PASSWORD
- DB_HOSTNAME
- LOCAL_DEV=true
composer:
build: docker/composer
user: $UID
environment:
- HOME=/home/composer
volumes:
- websrc:/app
command: composer install
working_dir: /app
volumes:
websrc:
driver: local
driver_opts:
o: bind
type: none
device: $PWD
Given
+ pwd
/opt/atlassian/pipelines/agent/build
and
+ echo $BITBUCKET_CLONE_DIR
/opt/atlassian/pipelines/agent/build
could you please suggest what I need to change to make things work on bitbucket?
the files are definitely loaded under the current build directory
please see https://jira.atlassian.com/browse/BCLOUD-17592 for problem description and workaround.
named volumes are currently not supported by the docker authorization plugin we have installed for security reasons.
In the caching specifications
https://confluence.atlassian.com/bitbucket/caching-dependencies-895552876.html
for composer for instance the path is `~/.composer/cache`
This is outside the
so will i be able to mount this on a composer container in docker or is this also going to trigger an error.
It would be nice to use caching for composer but looks like the caching is not happening in the build directory but instead under the user directory?
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.