is there a simpler way than this to build and push...
# general
b
is there a simpler way than this to build and push a docker image to ECR? https://github.com/pulumi/pulumi-docker/blob/master/docker/tests/image/index.ts#L25-L39
w
Which part of this were you hoping to be simpler? The first statement is required to create an ECR repository to use. The second statement is required to get credentials for accessing it from AWS (given that these are short lived and not directly available from the repository). The third statement captures which folder to build and what name to tag and push it with. In something like
cloud.Service
we hide all of those steps inside
new cloud.Service("s", { build: "./app" })
, but all of those steps still have to happen.
b
Why does the
getCredentials
function need a registry id? I'm running into dependency issues on previews since the repo doesn't exist yet
w
I think the short lived credentials are specific to a registry. This ultimately boils down to https://docs.aws.amazon.com/cli/latest/reference/ecr/get-login.html.
b
Registry IDs are optional, it should be possible to get a global login for a specific region
w
Ahh - indeed that is right - we can likely relax this in the
getCredentials
API then. Want to open an issue in https://github.com/pulumi/pulumi-docker?
b
I can do that, did you mean open an issue under https://github.com/pulumi/pulumi-aws instead?
w
Yeah - that works - thanks!