Docker native doesn't follow symlinks. What should docker-platform do with _www?
isholgueras opened this issue · 3 comments
Platform.sh cli configures its docroot (_www) as a symlink to ./.platform/local/builds/default/web.
When I execute platform-docker start
and execute platform-docker ssh http
, /var/platform/_www
cannot be opened because of the symlink. Docker, afaik, doesn't allow to configure follow hosts' symlinks.
I could solve it manually configuring one of this two options:
- Configuring the docroot as
./platform/local/builds/default/web
when initializing platform-docker - Mounting
./.platform/local/builds/default/web
in _www and configuring docroot with _www.
I like more the first option so I'm thinking about guessing, in InitCommand.php:51, if there is a platform.sh project builded, find which is its docroot and suggest that value to the user when prompting for docroot.
I don't know very well how platform.sh cli works with builds and if this solution is viable.
What do you think about it?
So I have this working with the newest Platform.sh structure using _www
.
The symlink is _www -> .platform/local/builds/default/public
.
Both of the nginx and php containers munt './:/var/platform'
so that they can respect the symlink, and any others.
I've been using this tool more with non Platform.sh builds lately, so I have to try it more. But, I know I have a Platform.sh sandbox for a Drupal Commerce tech partner integration and it runs fine. But, this is on my Mac.
No, it doesn't work for me. I have to configure "web" directory as docroot on init to run it.
I'm running it on Ubuntu, so maybe is different between Mac and Linux. Don't know. Does your partner works on Mac too?
Maybe I'm doing something wrong, but I have this same issue: http://unix.stackexchange.com/questions/204250/docker-file-system-compatibility-with-symbolic-links/319764#319764, and also I have this same issue in other docker environments.
I will research about it.
Weird! I'll try it out. I built this tool originally to help bridge using Docker between my Linux laptop and iMac. Something must have changed.