I have a docker image I am running to test our web application. The problem comes from a write permission
docker-compose run --rm -v="$BITBUCKET_CLONE_DIR:/var/www/app" -u root -p 0.0.0.0:8000:80 -p 0.0.0.0:8080:8080 -p 0.0.0.0:8081:8081 app ci/run-behat-tests.sh
I do not get an error with attaching the volume. In the script I trying and run a test and I get a write permission error
<b>Fatal error</b>: Uncaught RuntimeException: Unable to create the storage directory (/var/www/app/var/cache/test/profiler).
In the script I execute the following and get the following results:
echo $(whoami)
root
echo $(pwd)
/var/www/app
echo $(ls -l /var/www/app)
-rw-rw-rw-. 1 nobody nogroup 101 Apr 11 16:58 file
-rw-rw-rw-. 1 nobody nogroup 2627 Apr 11 16:58 file
-rw-rw-rw-. 1 nobody nogroup 36300 Apr 11 16:58 file
-rw-rw-rw-. 1 nobody nogroup 4163 Apr 11 16:58 file
-rw-rw-rw-. 1 nobody nogroup 149 Apr 11 16:58 file
-rw-rw-rw-. 1 nobody nogroup 105 Apr 11 16:58 file
-rw-rw-rw-. 1 nobody nogroup 8578 Apr 11 16:58 file
drwxrwxrwx. 5 nobody nogroup 4096 Apr 11 16:58 app
echo $(ls -l /var/www/app/var)
-rw-rw-rw-. 1 nobody nogroup 33831 Apr 11 17:01 file
-rw-r--r--. 1 root root 42834 Apr 11 17:01 file
drwxr-xr-x. 3 root root 4096 Apr 11 17:01 cache
drwxrwxrwx. 2 nobody nogroup 4096 Apr 11 16:58 logs
drwxrwxrwx. 2 nobody nogroup 4096 Apr 11 16:58 sessions
How can my application write to my var/cache folder?