https://pulumi.com logo
Title
a

agreeable-processor-5681

01/06/2022, 4:36 PM
Any idea why pulumi is always pushing to docker.io and not my ecr?
const ecrRepo = new aws.ecr.Repository(
        _.kebabCase(`${projectName} Repository`),
        {
            tags: {
                name: _.kebabCase(`${projectName} repository`),
            },
            imageTagMutability: "MUTABLE",
            imageScanningConfiguration: {
                scanOnPush: true,
            },
            name: _.kebabCase(`${environment} ${projectName} Repository`),
        },
    );

    const {password, userName} = await aws.ecr.getAuthorizationToken({
        registryId: ecrRepo.registryId,
    });

    const dockerImage = new docker.Image(
        _.kebabCase(`${projectName} Docker Image`),
        {
            imageName: _.kebabCase(`${projectName}`),
            build: {
                context: `./`,
                dockerfile: "Dockerfile",
            },
            registry: {
                server: ecrRepo.repositoryUrl,
                password: password,
                username: userName,
            },
        },
        {
            parent: ecrRepo,
        },
    );
b

billowy-army-68599

01/06/2022, 4:41 PM
what is the name of the image it creates?
you need to tag the image with your ECR repo name
a

agreeable-processor-5681

01/06/2022, 8:30 PM
👍 I will try that
that did it