How to pass a named fifo to container?

I want to use named fifo for host to container commucation,so i do these try:

  1. run mkfifo on host to make a named fifo in /root/fifo
  2. add following line to container config file
    lxc.mount.entry = /root/pipe dev/pipe none optional,create=file
    3.start the container

container can be started successfully,and there is a pipe under /dev,but looks as if this pipe just a normal file,not a linux named pipe

so is there any way to do this ?


I think you want

lxc.mount.entry = /root/pipe dev/pipe none bind,optional,create=file

i.e. add a missing bind.