Skip to content

Setting ipcMode to container:[...] always results in a change #1354

@kumavis

Description

@kumavis

Describe what happened

ipc docs https://docs.docker.com/reference/cli/docker/container/run/#ipc

setting ipcMode to container:${otherContainerName} results in pulumi always recognizing a change, bc docker resolves otherContainerName to its container id and responds with the container state having ipcMode container:$idOfOtherContainer

understanding this i tried setting it as a computed value of the output of the other container, but this resulted in pulumi also always recognizing it as having changed bc its set as a computed value (?)

ipcMode: otherContainer.id.apply(id => `container:${id}`)

Sample program

const imageA = new docker.RemoteImage(serviceNameA, { name: imageNameA }, { provider });
const containerA = new docker.Container(serviceNameA, {
  image: imageA.imageId,
  name: serviceNameA,
  // this works fine, marks container A as the host for another's ipcMode=container
  ipcMode: 'shareable',
});

const imageB = new docker.RemoteImage(serviceNameB, { name: imageNameB }, { provider });
const containerB = new docker.Container(serviceNameB, {
  image: imageB.imageId,
  name: serviceNameB,

  // either of this configurations always result in pulumi detecting a change
  ipcMode: `container:${serviceNameA}`,
  // ipcMode: containerA.id.apply(id => `container:${id}`)
}, { dependsOn: [containerA] });

Log output

from pulumi up details

      ~ ipcMode: "container:481c0030d79235f891145fd0db303c53c5c1180f02979de6584cf73091b72047" => "container:otherContainerName"

Affected Resource(s)

pulumi-docker

Output of pulumi about

x

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-upstreamThe issue cannot be resolved without action in another repository (may be owned by Pulumi).kind/bugSome behavior is incorrect or out of spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions