https://pulumi.com logo
#general
Title
# general
i

incalculable-portugal-13011

10/15/2019, 4:13 PM
hey all, I’m attempting to pull a remote, third-party docker image from dockerhub and pipe that into an ecr repository. should be pretty simple but clearly getting hung up on something:
Copy code
const containerRepository = new awsx.ecr.Repository("selenium/hub", {});

const dockerHubSeleniumHubImage = new docker.RemoteImage("selenium/hub", {
    name: "selenium/hub",
    keepLocally: true
});

containerRepository.buildAndPushImage(dockerHubSeleniumHubImage.name);
I’m getting an error back along the lines of
path "selenium/hub not found
. clearly missing a step here, just not sure what it is
b

better-rainbow-14549

10/15/2019, 4:15 PM
missing version tag on the image name perhaps?
i

incalculable-portugal-13011

10/15/2019, 4:17 PM
tried it with
latest
appended to the name, same result
I was playing around with invoking
getRegistryImage
per here but unfortunately that didn’t work either: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/docker/#example-usage-5
b

better-rainbow-14549

10/15/2019, 4:21 PM
i haven't got round to using docker in pulumi yet so i've no idea sorry
i

incalculable-portugal-13011

10/15/2019, 4:22 PM
no worries, appreciate the help regardless
c

cool-egg-852

10/15/2019, 4:30 PM
My guess is it’s the first line. Try removing
selenium/
from the
awsx.ecr.Repository
resource.
s

steep-printer-55468

12/18/2019, 8:10 PM
@incalculable-portugal-13011 were you able to figure this out?
I have a similar problem and found this thread in a search
i

incalculable-portugal-13011

12/18/2019, 8:37 PM
as far as I can tell, pulumi doesn’t support that. I ended up just writing a script that would 1) pull my images off the hub and 2) upload them to ecr. then run my pulumi up workflow like normal
s

steep-printer-55468

12/18/2019, 8:38 PM
gotcha, thanks
i

incalculable-portugal-13011

12/18/2019, 8:38 PM
yeah bummer, I agree. kind of an overlooked workflow that seems more common than you’d think
s

steep-printer-55468

12/18/2019, 8:39 PM
yep 😕
what I wanted to do was use a "read-only" stack that grabbed outputs from an application stack, then shunted images from one repo to ECR and kicked a service
ah well
i

incalculable-portugal-13011

12/18/2019, 8:41 PM
basically exactly what I’m doing in my thing. luckily that there’s at least a demarcation point where once your image is on ecr, the syntax is easy on pulumi for incorporating it. can always have whatever process starts your application stack just upload the image/outputs to ecr 🤷