Ask the boys and girls from Toradex to point you to their tutorials on file sharing between host and docker container.
If you go with a message queue or shared memory approach, you should not need though.
I’m guessing you either didn’t give your containers proper access -OR- your Yocto build didn’t change file ownership and protection.
I don’t use Microsoft products, so if you are using Visual Studio Code, you are on your own.