How to spoof syscalls made in a container?

Hi Docker’s users,

I need to spoof one or several syscalls made by an application in a Docker container.

For example, one of our application is checking a file using the stat syscall and I’d like to spoof it to return one or another value.
The current workaround is to change the source code of this application and compile but that asks more work for something I’m sure can be solved quickly with Docker since Docker is already filtering syscalls.

I have tried to use a library with LD_PRELOAD and have tried some ptrace stuffs without any success since our application is using 32b and 64b.

=> Is there any filter/module Docker side to spoof/control the syscall made by an application in a specific container?

Thank you!