Problem
Your builds fail when pushing images to Amazon ECR encountering a a ProcessException: Error executing '/usr/bin/docker login -u AWS -p ******** -e ********
712484210124.dkr.ecr.eu-west-1.amazonaws.com
', exit code: 125
:
Code Block | ||
---|---|---|
| ||
build 20-Jul-2018 12:53:07 Not logged in to 712484210124.dkr.ecr.eu-west-1.amazonaws.com error 20-Jul-2018 12:53:07 Error occurred while running Task 'Push image to ECR(3)' of type com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli. error 20-Jul-2018 12:53:07 com.atlassian.bamboo.task.TaskException: Failed to execute task error 20-Jul-2018 12:53:07 at com.atlassian.bamboo.plugins.docker.service.PushService.execute(PushService.java:41) [...] error 20-Jul-2018 12:53:07 Caused by: com.atlassian.bamboo.docker.DockerException: Error running Docker push command. See messages above for details. error 20-Jul-2018 12:53:07 at com.atlassian.bamboo.plugins.docker.client.DockerCmd.push(DockerCmd.java:157) error 20-Jul-2018 12:53:07 at com.atlassian.bamboo.plugins.docker.service.PushService.execute(PushService.java:37) error 20-Jul-2018 12:53:07 ... 17 more error 20-Jul-2018 12:53:07 Caused by: com.atlassian.utils.process.ProcessException: Error executing '/usr/bin/docker login -u AWS -p ******** -e ******** 712484210124.dkr.ecr.eu-west-1.amazonaws.com', exit code: 125 |
...
You are probably using Utoolity's s ECR Credentials task together together with Atlassian's built-in in Docker task, as outlined in in How to push a Docker image to a repository in your Amazon ECR registry with the Bamboo Docker task.
Under the hood, the Bamboo Docker task is using a docker login command login command line including the meanwhile unsupported unsupported --email or -e flagemail or -e flag, as confirmed by the resp. issue issue Docker Task: -e required for docker push command (BAM-18613). The --email or -e flag has been email or -e flag has been removed as of Docker version 17.06.0-ce, so an upgrade to this or a newer Docker version without an accompanying upgrade of the Bamboo Docker task will yield the exception at hand.
...
You should upgrade to a newer Bamboo release that addresses this problem - according to to Docker Task: -e required for docker push command (BAM-18613) the the first version that includes this fix seems to be 6.2.0.
...
If you cannot upgrade your Bamboo version right away, you might be able to apply one of the following workarounds:
Upgrade only the Bamboo Docker app itself
toto release 6.2.0, as suggested by Atlassian's Alexey Chystoprudov in his answer
toPlease note that Alexey emphasizes that they
cannotcannot guarantee it is 100% compatible!
Temporarily replace the dedicated Docker task by specifying the
desired docker login commanddesired docker login command line without
thethe --
email flag from aemail flag from a Script task
insteadinstead.
You can inject the ECR credentials in a similar fashion as outlined for the regular AWS credentials
inin How to work around limitations with the AWS Command Line Interface (AWS CLI).
Related articles
Filter by label (Content by label) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
...
|
Page Properties | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
Jira Legacy | server | System JIRA | columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution | serverId | fac61c2e-db0a-39da-bb3c-e0dc0ef556f0 | key |
|