You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.
```
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 ?
Artsiom Zhurbila
1 comment