Handling mkfifo between host and docker


Have a docker engine running on RHEL 7.4 64bit

I have to load/read streaming data that are generated on the docker HOST (RHEL 7.4 64bit)

I have created for such a fifo file
[root@localhost /mnt/stagging]# mkfifo /mnt/stagging/scratch/tmp/event.dat

[root@localhost /mnt/stagging]#ll/mnt/stagging/scratch/tmp/

prw-r--r--. 1 root root 0 Sep 26 15:20 event.dat

then I have jobs that will generate/pipe data into event.dat

But while data has been feeding, when I run
[root@localhost /mnt/stagging]# docker exec -i MyContainer /mnt/stagging/readfifo

it is failing with that error : rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused “exec format error”

But when I run my readfifo inside docker :

[root@localhost /mnt/stagging]# docker exec -i MyContainer bash

[root@localhost MyContainer]#
[root@localhost MyContainer]# /mnt/stagging/readfifo that is working

Here is my mount info

“Mounts”: [
“Type”: “bind”,
“Source”: “/mnt/stagging”,
“Destination”: “/mnt/dataflow”,
“Mode”: “”,
“RW”: true,
“Propagation”: “”

Any advise ?

Summary question is 'How to handle fifo and passing of data from the host to a docker container then just use docker exec command" ?

Thank you