https://pulumi.com logo
Title
r

rich-dress-42878

12/09/2022, 1:39 AM
Hey, I am building and deploying an image to ECR using
awsx.ecr.Image
. It's working great. I was wondering if there is a workflow/story for conveniently accessing a Dockerfile from a remote URL, rather than a local path. My application code as well as its corresponding Dockerfile are in a separate repo from my infra repo in this case. E.g. something like this (doesn't work, of course):
const image = new awsx.ecr.Image("image", {
  // ...
  path: "<https://github.com/>...",
  // dockerfile: "...",
});
I have some ideas for dynamically pulling in the dockerfile by leveraging the language ecosystem (JS/TS/Node in this case) but I think that might be overcomplicating this a bit
l

little-cartoon-10569

12/09/2022, 2:06 AM
Generally, the image would be pushed to the repo by a workflow / pipeline in the app / Dockerfile repo, wouldn't it?
Else you run the risk of building a new image every time you do a deployment. Which isn't generally the right thing to do. You want to deploy a previously-released and accepted image.
r

rich-dress-42878

12/09/2022, 2:07 AM
That is true, I will stick with that. I was just following the official Pulumi examples which couple them (e.g. https://github.com/pulumi/examples/blob/master/aws-ts-hello-fargate/index.ts and others) so thought there might be a convenient way to approach it. Thanks tenwit!