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.
What
docker-ts-multi-container-appfails to compile, sopulumi preview/uperrors out during program load:Cause
index.tsline 23 usesredisImage.latest:RemoteImage.latestwas a v3 property and was removed in@pulumi/dockerv4. The example'spackage.jsonpins"@pulumi/docker": "4.11.2", whereRemoteImageexposesimageId/name/repoDigestinstead — so the program is pinned to v4 but still calls the v3 API.(The other reference in the file,
appImage.baseImageName, is fine —Image.baseImageNamestill exists in v4.)This looks like a line that the Node→Docker-v4 migration in #1591 missed. The Python sibling
docker-py-multi-container-appwas migrated correctly and usesimage=redis_image.name.Fix
Mirror the Python variant — change
index.ts:23to a v4 property:Environment / repro
docker-ts-multi-container-app@master, unmodified, with its pinned@pulumi/docker@4.11.2and@pulumi/pulumi@3.228.0.3.243.0); also reproduces with a plain localpulumi preview.