I’m setting up a CI workflow based on this tutorial: https://circleci.com/blog/continuous-drupal-p1-maintaining-with-docker-git-composer/
I’m currently facing this issue: In both my dev and testing environment, I mount the application directory like this:
volumes: - ./app:/app
This is done on both my Nginx and PHP images. However, as the /app originates from my Git repo, and come into existence by running “git clone”, the UID set for these files will be that of the user running on the actual host which executes the git clone command. So for every environment, i.e. linux server, the UID may vary.
My current plan is not to bundle the code, i.e.e “/app”, within the docker container, not even in production, but have the container mount the /app folder. I know this is probably an antipattern, but will be a compromise until I get to know the application better - using this pattern, if needed I can make changes to the code in production, and commit it to the git repo.
Anyways, back to the issue: How are others managing having different UID across different environments, when mounting volumes inside containers?