https://pulumi.com logo
#getting-started
Title
# getting-started
i

important-lion-7565

12/21/2023, 2:55 AM
I'm encountering an issue where the docker container image property remains constant, yet Pulumi detects a difference due to the image property now being represented by a sha256 value. Any suggestions?
l

little-cartoon-10569

12/21/2023, 2:58 AM
You're changing the value of "image". Was that intentional? What resource is this a property of? What should be in the image property? It looks like either the new, the old or both values are wrong.
i

important-lion-7565

12/21/2023, 3:07 AM
I'm executing a "pulumi up" without modifying any code properties, yet it appears to interpret the 'image' property as a sha256 value, resulting in a detected difference.
Fixed it by using correct image property value.
Copy code
const ngingxImage = new docker.RemoteImage(
  "nginx-image",
  {
    name: "nginx:stable-alpine3.17-slim",
  },
  { provider: dockerRemote }
);

const nginxContainer = new docker.Container(
  "nginx-container",
  {
    // Use the Nginx image from the Docker Hub
    image: ngingxImage.imageId,
    // Map port 80 from the container to the host
    ports: [
      {
        internal: 80,
        external: 80,
      },
    ],
  },
  { provider: dockerRemote }
);