Skip to content

Push docker image to private ECR ? #4005

Answered by rgarrigue
rgarrigue asked this question in Q&A
Discussion options

You must be logged in to vote

So it was my bad : docker login was logging against Gitlab own registry, successfully but wasn't where I wanted to push. Fixing .gitlab-ci.yml like this work (also because my runner got the proper IAM profile for aws ecr get-login-password to work)

  script:
    - apk add aws-cli
    - aws ecr get-login-password --region eu-central-1 | docker login --username AWS --password-stdin 1234567890.dkr.ecr.eu-central-1.amazonaws.com
    - goreleaser release --clean

Thanks for implicitely confirming that it wasn't about some goreleaser trick I missed out.

Maybe the above snippet would be nice in the doc as an example about dealing with private registry. I found no reference on the topic to at lea…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rgarrigue
Comment options

Answer selected by rgarrigue
@caarlos0
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants