Can compile but not run in mounted folder

We have a linux build environment (based on opensuse) that is relatively complicated to set up for new colleagues. It contains software we do not have the source to and a bunch of debugging tools which requires old libraries. I thought this was a good opportunity to learn and use Docker to setup the compiler and test suite. This works well for me (Linux host) and one colleague on MacOS (10.14 Mojave), but on three other Mac computer (10.13 and 10.15) it is not possible to run the compiled binary:

  • The source files are bind mounted (-v flag) and compiled inside the container. This works for all users.
  • The compiled binary (located inside the mounted folder) cannot be started by three of the four mac users.
  • The compiled binary can be started by all users if it is moved outside of the mounted folder .

We thought this could be related to user privileges, but they are exactly the same between all Mac users. Chmodding or running as root does not make a difference. Any clues?