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

Still need help?

The Atlassian Community is here for you.

Ask the community

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

 

Summary

Pipelines does not allow the use of docker --mount commands.

Diagnosis

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

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:

docker run -i --mount <directory_to_mount>

We've had to restrict the docker 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 of docker 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:

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 this article for the full list of restricted docker commands.



Last modified on Jan 2, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.