Open adam-clarey opened 3 years ago
Hi - did you solve this ? It is definitely to do with the shared volume ./:/var/www/html if you remove those, it will work. But that doesn't really help. I too have changed perms and users and umask et'al and no joy. I also do have this working on another platform and can't figure out what the difference is. My set up is similar - testing in BB Pipelines, but Ubuntu is my local dev (works fine).
I think this is relevant - BitBucket does some funky stuff, as explained here.
So - workaround, in PHP/Nginx is - nest one folder deeper
volumes:
- ./:/var/www/html/SUBFOLDER
And make sure nginx uses that for its server root using the correct env var
NGINX_SERVER_ROOT=/var/www/html/SUBFOLDER
Even though on a desktop you can mount to the /var/www/html from your project source, in BitBucket Pipelines, this can not be done, well it can - but you can't then chmod! It has to do with userns (name spaces) but I am unclear how to get round it.
It seems like any call to $ chmod on a file from within a container, that is also within a shared volume - will not work !
This is not to do with Wodby images :) and suggest closing.
Problem: I'm trying to replicate the docker4drupal infrastructure in a bitbucket pipeline to run the automated tests. I cant just use the php image (which does work and can run unit tests, but not browser based tests) as the primary image in the pipeline, so instead i'm running 'docker-compose up' within a docker container (see pipeline script).
Pretty much all the containers startup as expected (chrome, memchached etc), however php and nginx images do not startup. Running 'docker-compose ps' shows both of those containers with status 'Exit 1'.
I've tried everything I can think of regarding permissions, such as setting 'user' : 'root' in the php container, changing the permissions on the host container etc. I've run out of ideas so hoping someone can point me in the right direction.
To make things simpler to debug, I have removed all containers from docker-compose.yml leaving only the php container.
docker-compose.yml
bitbucket-pipeline.yml