What does this error mean? > error: unrecognize...
# general
d
What does this error mean?
error: unrecognized resource type (Check): docker-buildindexImage
e
That's normally that a provider has got mixed up and a resource has been registered to the wrong type or wrong version of a provider. Are you using the provider or providers resource options?
d
I'm currently using the
@pulumi/docker
package, and I wanted to start using
@pulumi/docker-build
instead, so I installed that package and created a new resource alongside the old one with a new name
e
Can you share the code snippet for that?
d
Copy code
import * as docker from "@pulumi/docker";
import * as dockerBuild from "@pulumi/docker-build";

export const imageName = `backup:pulumi`;

const image = new docker.Image(
  "backup-image",
  {
    imageName,
    skipPush: true,
    build: {
      context: "../../",
      platform: "linux/amd64",
      dockerfile: "../../apps/backup/Dockerfile",
    },
  },
  { provider: dockerProvider },
);

export const image2 = new dockerBuild.Image(
  "backup-image2",
  {
    tags: [imageName],
    push: false,
    dockerfile: {
      location: "../../apps/backup/Dockerfile",
    },
    context: {
      location: "../../",
    },
    platforms: ["linux/amd64"],
  },
  { provider: dockerProvider },
);
So
image
is my old one, I added
image2
and ran
pulumi up
just to see if it would work
I do use
@pulumi/docker-build
in other stacks as well