magnificent-soccer-44287
09/23/2023, 10:26 PMbillowy-army-68599
magnificent-soccer-44287
09/23/2023, 10:29 PMbillowy-army-68599
magnificent-soccer-44287
09/23/2023, 10:30 PMconst ecrRepository = new aws.ecr.Repository("pmb-main", { name: "pmb-main-ecr" });
const dockerImage = new docker.Image("pmb-main", {
build: {
args: {
BUILDKIT_INLINE_CACHE: "1",
},
builderVersion: "BuilderBuildKit",
cacheFrom: {
images: [pulumi.interpolate(`${ecrRepository.repositoryUrl}:latest`)],
},
platform: "linux/amd64",
context: "../../",
dockerfile: "../../.cicd/imageFiles/Dockerfile",
},
imageName: pulumi.interpolate(`${ecrRepository.repositoryUrl}:latest`),
registry: {
password: pulumi.secret(aws.ecr.getAuthorizationTokenOutput({
registryId: ecrRepository.registryId,
}).apply(authToken => authToken.password)),
server: ecrRepository.repositoryUrl,
}
});
billowy-army-68599
magnificent-soccer-44287
09/23/2023, 10:33 PMType Name Status Info
pulumi:pulumi:Stack pmb-development **failed** 1 error
+ ββ docker:index:Image pmb-main **creating failed** 1 error; 2 warnings
Diagnostics:
pulumi:pulumi:Stack (pmb-development):
error: update failed
docker:index:Image (pmb-main):
warning: username was not set, although password was; using host credentials file
warning: username was not set, although password was; using host credentials file
error: unauthorized: incorrect username or password
const ecrRepository = new awsx.ecr.Repository("pmb-main", { name: "pmb-main-ecr" });
const dockerImage = new docker.Image("pmb-main", {
build: {
args: {
BUILDKIT_INLINE_CACHE: "1"
},
platform: "linux/amd64",
builderVersion: "BuilderBuildKit",
cacheFrom: {
images: [pulumi.interpolate(`${ecrRepository.url}:latest`)],
},
context: "../../",
dockerfile: "../../.cicd/imageFiles/Dockerfile",
},
imageName: pulumi.interpolate(`${ecrRepository.url}:latest`),
registry: {
password: pulumi.secret(aws.ecr.getAuthorizationTokenOutput({
registryId: ecrRepository.registryId,
}).apply(authToken => authToken.password)),
server: ecrRepository.url,
}
});
pulumi.interpolate`${ecrRepository.url}:latest`
and:
pulumi.interpolate(`${ecrRepository.url}:latest`)
Are not the same at all - for me personally, I would expect them to behave the same. Not sure if some directive/preamble parser or promise resolver is mucking things up down the line, but this accounts for the non-deterministic behavior of awsx.ecr.Repository + docker.Image π working on debugging the rest.billowy-army-68599
magnificent-soccer-44287
09/27/2023, 2:19 AMquaint-spring-93350
09/27/2023, 7:27 AMmagnificent-soccer-44287
09/27/2023, 8:04 PM// cacheFrom: {
// images: [pulumi.interpolate`${pmbMainEcr.url}:latest`],
// },
I repeatedly get:
docker:index:Image (pmb-main):
error: could not open dockerfile at relative path Dockerfile: stat Dockerfile: no such file or directory
commenting it out, running preview once, and re-enabling it fixes the issue