Currently, the docker-compose file defines the codebase volume to allow developers to sync straight what they develop with the PHP / Nginx containers. This works great for local environments but not in a continuous integration environment. Continuous integrations systems do several steps of write/read actions such as copying settings files, generating/parsing static analysis tools like PHP, etc. With a docker4drupal system, there are actions that read/write files outside or inside the containers when a CI job is run, This leads to a lot of permission denied errors as typically the user's uids from the host and the containers are different.
Solution
Do not define local development volumes in docker-compose.yml
Define local development volumes at docker-compose.override.yml
Document where the volumes are defined so everyone knows how to edit it in the case is necessary (customizations), and the contributors of boilerplate know where it must be set.
Problem
Currently, the docker-compose file defines the codebase volume to allow developers to sync straight what they develop with the PHP / Nginx containers. This works great for local environments but not in a continuous integration environment. Continuous integrations systems do several steps of write/read actions such as copying settings files, generating/parsing static analysis tools like PHP, etc. With a docker4drupal system, there are actions that read/write files outside or inside the containers when a CI job is run, This leads to a lot of permission denied errors as typically the user's uids from the host and the containers are different.
Solution