The --ipc=host
and --ipc=container:id
options have since been added to the Docker create
and run
commands to share IPC resources.
--ipc="" : Set the IPC mode for the container, 'container:<name|id>': reuses another container's IPC namespace 'host': use the host's IPC namespace inside the container
IPC with the host
docker run --ipc=host <image>
IPC with another container
docker run --ipc=container:<id> <image>
IPC with another container may need the shareable
option set on the initial container (if dockerd defaults IPC to private
)
docker run --ipc=shareable <image>