I am trying to dockerise my laravel site. I am on Windows 10 and the docker toolbox doesn't work quite well for me (relative path doesn't mount well).
So, I have decided to setup a Virtualbox Ubuntu 16.x server and install docker CE inside the VM. Then I've added my
C:\Projects on my windows host machine as a shared folder into my Ubuntu VM. Then within my VM, I've installed the Guest Additions, so that the shared folder would appear in my VM under
Lastly, I've added my non-root account
latheesan to the
vboxsf using this command:
sudo adduser latheesan vboxsf and created a symbolic link to
/home/latheesan/Projects (for easy access).
After rebooting the Ubuntu VM, I could access the shared folder contents as latheesan user.
So, I cloned my project on my host machine into:
Then I ssh'ed into my Ubuntu virtualbox VM (running Docker CE) and ran my
docker-compose build && docker-compose up -d command. Everything worked and the containers were up. When I visited my site running in the docker container, I am getting this error from apache:
Forbidden You don't have permission to access / on this server.
So, I started an interactive shell into my container and it looks like the site directory is mounted as root, not www-data. Perhaps this is why the error.
Here's all the logs from my operation on my host machine & container: https://pastebin.com/raw/M7Jq0CgP
This is my setup:
Any ideas why the volume is not mounting as
www-data? or is this not possible using windows host machine + virtual box vm + docker ce?