stale-park-1622
07/15/2024, 3:37 PM@pulumi/docker-build
. I am using aws conainter registry. When I run pulumi preview
I am getting the following error:
Diagnostics:
docker-build:index:Image (api-docker-image):
error: Resource type 'docker-build:index:Image' not found.
Here is the snippet of the code:
this.image = new docker_build.Image(
`${args.buildType}-docker-image`,
{
tags: [pulumi.interpolate`${this.repository.repositoryUrl}:${args.commitHash}_${Date.now()}`],
push: true,
buildOnPreview: args.buildOnPreview,
dockerfile: {
location: args.dockerfile,
},
context: {
location: args.buildContext,
},
buildArgs: {
...args.dockerBuildArgs,
BUILDKIT_INLINE_CACHE: '1', // This will enable buildkit to use cache
},
cacheFrom: [{
registry: { ref: pulumi.interpolate`${this.repository.repositoryUrl}:cache` },
}],
cacheTo: [{
registry: { ref: pulumi.interpolate`${this.repository.repositoryUrl}:cache` },
}],
platforms: [docker_build.Platform.Linux_amd64],
registries: [{
address: this.repository.repositoryUrl,
username: token.apply(token => token.userName),
password: pulumi.secret(token.apply(token => token.password)),
}],
},
{ provider: args.provider, parent: this.repository, dependsOn: [this.repository] },
);
I am not sure what this error is? Previously I was using the @pulumi/docker
to build and push images to aws ecr and it was working fine. Right now, i am setting up a new repository on aws ECR using the docker-build and runnign into this error.
thank you.incalculable-motherboard-92742
07/22/2024, 6:37 PMstale-park-1622
07/26/2024, 4:57 PM