There is an example with shared memory here that can be used as a template.
Pull a base image OS:
docker pull debian:stable-slim
Create/run/test the container with option '–ipc=“host”:
docker run -d --ipc="host" --name debian debian:stable-slim bash
if the source C-file (here ‘shm’) is located in root directory, this file can be copied to e.g. ‘/home’ folder in docker container:
sudo docker cp shm debian:/home
If the container is stopped, start the container again in interactive mode. Then the C-application should be at the home directory. Run this file and the e!Cockpit project.
The file descriptors are present in the container:
The host: