Using the new Docker v4 and ECR, I keep getting “i...
# aws
Using the new Docker v4 and ECR, I keep getting “invalid reference format”:
Copy code
error: error: invalid reference format. This provider requires all image names to be fully qualified.
    For example, if you are attempting to push to Dockerhub, prefix your image name with `<|>`:

(I’m migrating from old tech, so I don’t know what I’m doing wrong). Technical details in 🧵
My createImage code isn’t particularly complicated:
Copy code
const createImage = (registryId: pulumi.Output<string>) => {
    const registryToken = aws.ecr.getAuthorizationTokenOutput({ registryId });

    return registryToken.apply((registry) => {
      const recorderImage = new docker.Image('recorder', {
        imageName: `${imageName}:${imageVersion}`,
        build: {
          context: SERVICE_PATH,
          platform: 'linux/amd64',
      return recorderImage.imageName;
I’ve tried: •
• ``${registry.proxyEndpoint}/${imageName}:${imageVersion}`` • ``${imageName}:${imageVersion}`` None of them worked.
theres some deets in the v4 release notes, are any of those helpful to you?
Okay, so if I strip the
off of the
and use that like so:
Copy code
then it goes on, but now it’s seems to be failing with credentials being wrong. I’m trying this:
Copy code
registry: {
          server: '<|>',
          username: 'AWS',
          password: registry.password,
Does that look right?
I just tried adding
on to the end of server to see if that made a difference, negative.
I’ve been using
for repository and image to build and push. Not sure if that’s helpful but it’s working for us.
I eventually sorted things out. Basically, the sample code I had was incorrect and I needed to use different values in all of the locations in order to make it work.
@polite-umbrella-11196, did that sample code come from the Pulumi docs or any Pulumi-authored examples? If so, it would be helpful to know so that we can work to correct them.