Skip to content

docker-ts-multi-container-app fails to compile: uses RemoteImage.latest, removed in @pulumi/docker v4 #2821

@borisschlosser

Description

@borisschlosser

What

docker-ts-multi-container-app fails to compile, so pulumi preview/up errors out during program load:

TSError: ⨯ Unable to compile TypeScript:
index.ts(23,23): error TS2339: Property 'latest' does not exist on type 'RemoteImage'.

Cause

index.ts line 23 uses redisImage.latest:

const redisContainer = new docker.Container("redisContainer", {
    image: redisImage.latest,   // <- removed in @pulumi/docker v4
    ...

RemoteImage.latest was a v3 property and was removed in @pulumi/docker v4. The example's package.json pins "@pulumi/docker": "4.11.2", where RemoteImage exposes imageId / name / repoDigest instead — so the program is pinned to v4 but still calls the v3 API.

(The other reference in the file, appImage.baseImageName, is fine — Image.baseImageName still exists in v4.)

This looks like a line that the Node→Docker-v4 migration in #1591 missed. The Python sibling docker-py-multi-container-app was migrated correctly and uses image=redis_image.name.

Fix

Mirror the Python variant — change index.ts:23 to a v4 property:

image: redisImage.name,        // or redisImage.repoDigest / redisImage.imageId

Environment / repro

  • docker-ts-multi-container-app @ master, unmodified, with its pinned @pulumi/docker@4.11.2 and @pulumi/pulumi@3.228.0.
  • Reproduced via Pulumi Deployments (Pulumi CLI 3.243.0); also reproduces with a plain local pulumi preview.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageNeeds attention from the triage team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions