Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Running cwltool in bitbucket pipelines leads to --mounts is not allowed

tristan_vanneste
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 14, 2024

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? 

2 answers

0 votes
Tobias Wohlfrom
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 22, 2024

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

 

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 16, 2024

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)

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events