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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,466,312
Community Members
 
Community Events
176
Community Groups

docker credentials store not working

Hi!
You told that ECR access not working in EAP

we decided to make a workaround with docker credential plugin

```
volumes:
- /tmp:/tmp:rw
- /var/run/docker.sock:/var/run/docker.sock:rw
- /var/lib/docker/containers:/var/lib/docker/containers:ro

- /root/.docker/config.json:/root/.docker/config.json:ro

- /usr/bin/docker-credential-ecr-login:/usr/bin/docker-credential-ecr-login:ro

```

config.json

```
cat ~/.docker/config.json
{
"credHelpers": {
"XXXXXX.dkr.ecr.us-east-1.amazonaws.com": "ecr-login"
}
```

but we still receive Error (on host pulling works correctly)

```
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:46,391] Pulling image docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-dvcs-tools:prod-stable.
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:46,505] Pulling image XXXX.dkr.ecr.us-east-1.amazonaws.com/XXXX:master.
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:46,546] An error occurred whilst pulling image.
bb_runner_server_test_1_1991e009485e | com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"Get https://XXXX.dkr.ecr.us-east-1.amazonaws.com/v2/XXXXX/manifests/master: no basic auth credentials"}
bb_runner_server_test_1_1991e009485e |
...
...
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:46,552] Removing container build
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:46,555] Removing container clone
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:46,557] Updating step progress to COMPLETING_LOGS.
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:46,885] Shutting down log uploader.
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:46,887] Tearing down directories.
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:46,889] Cancelling timeout
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:46,892] Completing step with result Result{status=FAILED, error=Some(Error{key='runner.bitbucket-pipelines.image-pull-failure', message='Status 500: {"message":"Get https://XXXX.dkr.ecr.us-east-1.amazonaws.com/v2/XXXX/manifests/master: no basic auth credentials"}
bb_runner_server_test_1_1991e009485e | ', arguments={}})}.
bb_runner_server_test_1_1991e009485e | [2021-03-24 15:24:47,230] Waiting for next step.
```

bb-runner-docker.png

also we think that pull all required docker images in advance (before running bitbucket job) in host (ec2) we run runner could help

```
docker pull xxx.dkr.ecr.us-east-1.amazonaws.com/xxx:master
master: Pulling from xxx
Digest: sha256:xxxx
Status: Image is up to date for xxxx.dkr.ecr.us-east-1.amazonaws.com/xxxx:master
# success pull on host
```

but the result is still the same -> Error "no basic auth credentials"


looks like your runner use docker lib which doesn't understand default docker behaviour

https://docs.docker.com/engine/reference/commandline/login/#credentials-store


@Justin Thomas may be you have idea how to resolve it?
could it be related to this issue https://github.com/docker-java/docker-java/issues/1048 ?


1 comment

lassian Atlassian Team Mar 24, 2021

Hi Artsiom,

This isn't something we have tested nor support.

Pipelines does support ECR credentials for images however the self hosted runners does not yet  support this feature yet as mentioned on https://community.atlassian.com/t5/Bitbucket-Pipelines-Runners/Getting-started-with-Bitbucket-Pipelines-Runners/ba-p/1628787#toc-hId-768946833

Support for ECR in self hosted runners is coming in a future release.

Kind Regards,

Nathan Burrell

Like Artsiom Zhurbila likes this

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events