HiveBrain v1.2.0
Get Started
← Back to all entries
debugdockerMinor

Why does `docker-login` fail in BitBucket pipelines?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
whypipelinesdockerloginbitbucketfaildoes

Problem

Aim

to login to a private docker registry using BitBucket pipelines.

Attempt

Based on this documentation the following bitbucket-pipelines.yml:

image: docker:latest

pipelines:
  default:
    - step:
        script:
          - docker login -u $D_REGISTRY_USER -p $D_REGISTRY_PASS $D_REGISTRY_URL

options:
  docker: true


was created. When BitBucket pipelines run this it results in:

+ docker login -u $DOCKER_REGISTRY_USERNAME -p $DOCKER_REGISTRY_PASSWORD 
$DOCKER_REGISTRY_URL
Warning: failed to get default registry endpoint from daemon 
(Error response from daemon: authorization denied by plugin pipelines: Command 
not supported.). 
Using system default: https://index.docker.io/v1/
Error response from daemon: authorization denied by plugin pipelines: Command 
not supported.

Solution

At the moment the docker login and docker push commands are only available to Pipelines Alpha members.

You can read about the features available to Alpha at "Pipelines Alpha".

In order to participate, the above link includes instructions on how you can opt-in to the added functionality.

Personally I received an e-mail from Atlassian a day after signing up saying my projects now include Alpha features. So this feature works in my pipelines without any issues.

Context

StackExchange DevOps Q#781, answer score: 4

Revisions (0)

No revisions yet.