is there any way to use an existing ecr image with...
# general
i
is there any way to use an existing ecr image with awsx fargate? the awsx container definition expects for the
image
property something that implements
ContainerImageProvider
, but there’s no way in
awsx.ecr
to actually pull an existing image – only to create one via
buildAndPushImage
. if I use
aws.ecr.getImage
, it returns a
getImageResult
which is incompatible as it doesn’t implement
ContainerImageProvider
r
you can always pass in a string image name, which is what I do for my own fargate deployments. my other CI builds and pushes the images, so when I deploy I just pass in the image name to set on the task definition.
i
it seems to be attempting to pull that from docker hub, as opposed to my ecr registry
perhaps because I appended a tag to the image name?
r
no, that's because you need the fully-qualified image name. image names are of the form
[REPO]/image[:TAG]
, where the repo and the tag are optional. If no repo is specified, the public docker hub is assumed. Here you need to provide the full ECR repo path
i
yep makes sense
thanks so much for the help, really appreciate it
r
sure thing, good luck!