I'm trying to implement tests for my cwl code in bitbucket pipelines. Therefore I need to run the cwl code using:
cwltool main.cwl inputs.yml
Although this works locally, if you run this in the bitbucket pipeline you get the following error:
docker: Error response from daemon: authorization denied by plugin pipelines: --mounts is not allowed.
I know cwltool uses the docker --mount option but I cannot find an alternative. Is there a way to fix this on the side of Bitbucket pipelines?
I had a similar problem. At least if you use a self hosted runner you can enable the --mount option by switching to a custom Docker image like
definitions:
services:
docker-custom:
type: docker
image: docker:27.1.2-dind-alpine3.20
memory: 8192
custom:
test:
- step:
name: Example
image: atlassian/default-image:4
runs-on:
- self.hosted
- linux
script:
- WORKFLOW_TMP=$BITBUCKET_CLONE_DIR/tmp
- mkdir $WORKFLOW_TMP
- export DEBIAN_FRONTEND=noninteractive
- export TZ=Europe/Berlin
- apt-get update
- apt-get install -y cwltool
- >-
cwltool
--tmpdir-prefix $WORKFLOW_TMP/
--tmp-outdir-prefix $WORKFLOW_TMP/
your-workflow.cwl
your-parameters.yml
services:
- docker-custom
Hi Tristan,
Unfortunately, there is no way to enable the docker mount option as this is disabled for security reasons. There are no plans to make this possible in Pipelines - you can see the rejection from our developers for this as a feature in the ticket below:
We do have an open feature request to allow this in Pipelines Runners, but we do not have an ETA as to whether it will be accepted/implemented. You may follow this by Watching it and Vote for it to improve its visibility with regard to customer demand:
Cheers!
- Ben (Bitbucket Cloud Support)
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.