IPC communication between Docker containers
IPC communication between Docker containers
Have you seen Shared Memory with Docker containers (docker version 1.4.1)? It sounds like you need to share the volume where the IPC lives and also set --ipc host
. In your example, it would be something like:
# Container #1
docker run -it --name c1 -v /tmp:/tmp --ipc=host container1
# Container #2
docker run -it --name c2 -v /tmp:/tmp --ipc=host container2
I have 3 containers, 2 containers share data to another container, what worked for me is:
# container 1
docker run -it --ipc=shareable -v ///tmp --network=host --name node container1
# container 2
docker run -it --ipc=container:node --volumes-from node --network=host --name mdns container2
# container 3
docker run -it --ipc=container:node --volumes-from node --network=host --name connection container3
container1
can get pid
of processes running in container2
and container3
and hence get data from the containers.
IPC communication between Docker containers
Related posts on Docker containers :
- How to run tensorflow with gpu support in docker-compose?
- I thought I understood Docker until I saw the BusyBox docker image
- Why the none image appears in Docker and how can we avoid it
- windows – Docker Quickstart Terminal: exit status 255
- dockerfile – What does Docker STOPSIGNAL do?
- docker – Is it possible to run containers on android devices?
- Docker compose, running containers in net:host
- containers – Docker vs. Rocket in development