Skip to content

Instantly share code, notes, and snippets.

@extremecoders-re
Last active January 21, 2019 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save extremecoders-re/6c5c1b4460686f56950cd32a6d45ac7b to your computer and use it in GitHub Desktop.
Save extremecoders-re/6c5c1b4460686f56950cd32a6d45ac7b to your computer and use it in GitHub Desktop.
Docker IPC using named pipe

Container C1

$ docker run --rm --name c1 --ipc shareable -it ubuntu:18.04 /bin/bash
# mkfifo /dev/shm/mypipe
# echo "Hello from C1" > /dev/shm/mypipe 

Container C2

$ docker run --rm --name c2 --ipc container:c1 -it ubuntu:18.04 /bin/bash
# cat /dev/shm/mypipe 
Hello from C1

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment