#Tag image publish to ECR

1 messages · Page 1 of 1 (latest)

frigid narwhal
#

Hi all, How can I tag images when publishing to ECR repo? docker cli has -t option. How to achieve that with Publish() in Go

chrome tendon
#

let us know if you still have questions after going through that guide

#

the only difference is that you need to a docker login against your ECR repo before calling the Publish pipeline

frigid narwhal
#

Hi @chrome tendon, thank for your quick response. I followed that guide. But I want image name like this hello:v2 not hello-123

chrome tendon
#

@frigid narwhal in the publish function you can send hello:v2 and it'll work

#

it'll push to a tag automatically

frigid narwhal
#

This is my code to publish image to ECR repo

#

Publish(ctx, "....dkr.ecr.ap-southeast-1.amazonaws.com/dagger-cdk-demo:v2")

#

It will fail and show error code 400 Bad request

#

Oh I think, I know the problem now. That's because of the setting on the ECR repo, not the code