Docker Error: authorization denied by plugin pipelines: Command not supported

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

Pipelines does not allow the use ofdocker --mount commands.

Diagnosis

Users would see the following error message when using thedocker mount command in Pipelines:

1 2 docker: Error response from daemon: authorization denied by plugin pipelines: Command not supported. See 'docker run --help'.

Cause

Users who try to run the following command in Pipelines would be affected by this problem:

1 docker run -i --mount <directory_to_mount>

We've had to restrict thedocker mount command for security reasons. The--mount option can be used to bind mount paths from the Docker In Docker (DinD) sidecar container. Due to the way that Unix sockets work with Docker, we disallow the usage ofdocker mount commands.

Solution

As a workaround, the users should use Docker Volumes (-v) instead of docker mount. please run the Docker image using volumes instead:

1 docker run -i -v $BITBUCKET_CLONE_DIR/path_to_subdirectory:/<CONTAINER-PATH>

In Bitbucket Pipelines, we don't yet support adding volumes other than BITBUCKET_CLONE_DIR (The absolute path of the directory that the repository is cloned into within the Docker container "/opt/atlassian/bitbucketci/agent/build/.*" or "/opt/atlassian/pipelines/agent/build/.*"). please refer to thisarticlefor the full list of restricted docker commands.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.