https://pulumi.com logo
#aws
Title
# aws
s

shy-solstice-54260

01/25/2024, 6:45 AM
Hi folks, I'm trying to pull a docker image from a private repo and push it to AWS ECR, I tried awsx.ecr.Image and docker.Image with right ecr registry info set. But they build the image and then push it, is there a way to skip the build and just push the local image available?
m

millions-furniture-75402

01/25/2024, 1:30 PM
Are you asking about the additional time it takes to build the image for to do the diff?
s

shy-solstice-54260

01/25/2024, 1:31 PM
in my build setup I build the images and upload them to dockerhub, now I want pulumi to just pull and upload this image to ECR without building the image locally again Related issue: https://github.com/pulumi/pulumi-docker/issues/54
docker.Image() builds image locally, which I want to avoid
m

millions-furniture-75402

01/25/2024, 1:37 PM
s

shy-solstice-54260

01/25/2024, 1:44 PM
Isn't that for buildcache? I want to avoid the build altogether I want to do this 1. docker pull <soucre> 2. docker tage <source> <ecr-dest> 3. docker push <ecr-dest> I can't find equivalent for 3
m

millions-furniture-75402

01/25/2024, 1:45 PM
I don't think you can currently achieve what you want with the provider
s

shy-solstice-54260

01/25/2024, 1:47 PM
Ah that's sad, so a work around is to use
command
and run docker commands like mentioned in the issue. Do you know any other work around?
m

millions-furniture-75402

01/25/2024, 1:48 PM
I was suggesting the build cache as a work-around, unfortunately. Command can work, or maybe look into something with https://www.pulumi.com/registry/packages/docker/api-docs/getregistryimage/ (I don't have any personal experience with this, though)
s

shy-solstice-54260

01/25/2024, 1:49 PM
I'll check that, Thanks!!
m

millions-furniture-75402

01/25/2024, 1:51 PM
Good luck, I'm curious about what solution you end up going with.