Bitbucket pipelines: does Docker volume mounting work yet?

I have a similar issue to this question but I have tried the suggested solutions and volume mounting still does not work.

  • I have verified that the directory I am trying to mount as a volume does exist within my build directory
  • I have run the `docker run ...` bare command with my container, which downloads and runs the container with no problems
  • I have tried using a volume mount with the environment variable, e.g. `docker run -v="$BITBUCKET_CLONE_DIR/dist:/dist" 18fgsa/html-proofer /dist`
  • I have also tried using a volume mount with the absolute path, e.g. `docker run -v="/opt/atlassian/pipelines/agent/build/dist:/dist" 18fgsa/html-proofer /dist`
  • I have also tried the volume mount option in the other format, e.g. `docker run -v "$BITBUCKET_CLONE_DIR/dist:/dist" 18fgsa/html-proofer /dist`

All of these permutations have resulted in the same error:

`docker: Error response from daemon: authorization denied by plugin pipelines: Command not supported.`

Is there some permission which has not been enabled for Docker volume mounts??

2 answers

1 accepted

Ok, for anyone reading this, as per the reply linked above, the answer is that you can currently only mount the bare $BITBUCKET_CLONE_DIR itself as the source for a volume. Any paths below it must be accounted for in your parameters passed to the run command.

So I changed my first example above to:

docker run -v="$BITBUCKET_CLONE_DIR:/app" 18fgsa/html-proofer /app/dist

... and then it worked.

Thanks @Philip Hodder 

Aha, I've just seen this reply to a similar question, I'll try that and see if it works for my issue.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

29,629 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you