Skip to content

Instantly share code, notes, and snippets.

@extremecoders-re
Last active November 24, 2024 19:20
Show Gist options
  • 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