In the VM, you set perms “755” (which mask to 644 for files)
-and/or-
On the native host, you set setgid inheritance (‘g+s’) and set it the first time
– From that point forward. anything written will receive permissions of the parent (which you’ve set)
FWIW: I hate docker. I do use LXC. The power of a full host without the overhead of a VM