Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

Your builds fail when pushing images to Amazon ECR encountering ProcessException: Error executing '/usr/bin/docker login -u AWS -p ******** -e ******** 712484210124.dkr.ecr.eu-west-1.amazonaws.com', exit code: 125:

Code Block
languagejava
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 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:

  1. Upgrade only the Bamboo Docker app itself

    to 

    to release 6.2.0, as suggested by Atlassian's Alexey Chystoprudov in his answer

    to 

    to Bamboo Docker Push fails

    (warning) Please note that Alexey emphasizes that they

    cannot 

    cannot guarantee it is 100% compatible!

  2. Temporarily replace the dedicated Docker task by specifying the

    desired docker login command

    desired docker login command line without

    the 

    the --

    email flag from a 

    email flag from a Script task

     instead

     instead.

     

    (lightbulb) You can inject the ECR credentials in a similar fashion as outlined for the regular AWS credentials

    in 

    in How to work around limitations with the AWS Command Line Interface (AWS CLI).

Filter by label (Content by label)
showLabelsfalse
max5
spacesUAAKB
sortmodified
showSpacefalse

...

...

reversetrue
typepage
cqllabel in ( "exception" , "amazon-ecr" ) and type = "page" and space = "UAAKB"
labelsamazon-s3 exception
Page Properties
hiddentrue


Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdfac61c2e-db0a-39da-bb3c-e0dc0ef556f0
key

Related issues

Jira Legacy
serverSystem JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdfac61c2e-db0a-39da-bb3c-e0dc0ef556f0
keyUAA-304

https://utoolity.atlassian.net/browse/UAA-304

https://utoolity.atlassian.net/browse/UAA-331