Closed Pomax closed 4 years ago
Further testing reveals the actual problem: Docker has no idea how to work with Windows when symlinks/junctions are involved, and it would be great if its error reflected that, instead.
I have the following directory layout (with my C drive being a small but blazing fast SSD, and the J drive being half a terabyte of slower SSD):
"C:\Users\Pomax\Documents\git\" <=symlinkd=> "J:\Junctions\Git projects\"
Just to confirm it was the symlink, not the space in the symlink target, I switched this over to:
"C:\Users\Pomax\Documents\git\" <=symlinkd=> "J:\Junctions\Git\"
Which made no difference, while putting the files in a non-symlinked path on C
works.
I initially thought this might also have been me having C
shared, but J
not shared, but keeping the symlink with both drives marked as shared still leads to the error shown above, to the solution here is two-fold:
@simonferquel what do you think? Can we error in case the host mount target is a symlink?
I also ran into issues mounting a symlinked folder to a networked drive. Would be great if you could support a symlinked folder. :)
I think that at least stating that symlinked folders would be much more descriptive in what is actually going on if there is no plans (or in the near future) to support them.
I can confirm this issue for docker compose on Mac.
Docker: 17.06.2-ce-mac27 (19124)
Just a simple ln -s /var/www/files $HOME/file
.
Could be an issue that /var/www is not inside list of directories which are allowed to bind. BUT on mac /var/www is a symlink to /private/var/www and /private is inside the allowed directories. Using the full path as volume in docker-compose it works.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
/remove-lifecycle stale
/remove-lifecycle stale
bump - having a bot flag this issue as stale is a pretty strong signal that someone at docker needs to decide whether to prioritise it (it is still an issue, loads of people use symlinks, informing your users of what went wrong is not too big an ask), or to close it (no one benefits from no one at docker even looking at this issue. Close it if you have no intention to address it)
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
/remove-lifecycle stale
It would be a nice thing to actually look into this, given the huge number of Windows users on this planet.
I ran into the same issue, but after I had to restart Docker on my Windows workstation due to memory issues. Never encountered this before. I have 8GiB of memory and though I have minimal applications open, I have 60-70% utilisation.
Not sure if this helps to reproduce the issue, but I thought I'd throw it out there anyway.
EDIT: This issue occurs for me with Docker for Windows using Linux containers, docker-compose and a simple nginx:alpine service with a volume mounted to /usr/share/nginx/html
.
I just wanna learn D3.js, goshdarnit
EDIT 2: Through pruning volumes and networks, I got past this error. Maybe that helps.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
/remove-lifecycle stale
And again: if someone from Docker can comment on whether this is still the case, and if it is, can we finally fix it?
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
/remove-lifecycle stale
And still: it'd be lovely if there was some kind of triaging so that every issue got at least seen by a docker dev. It's only been... oh, over 2 years.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
I was hoping someone looked at this in the over-two-years of this issue existing, but I guess triage is just not something that happens on this repo.
I'm having this problem on a Linux host, but in my case, the mounted folder isn't a symlink, but a unionfs mountpoint.
I tried the following:
unionfs folder1:folder2 union-folder
cd union-folder
# A docker-compose.yml is in the folder
docker-compose up
My docker-compose.yml
contains:
version: '3'
services:
web:
image: yiisoftware/yii2-php:7.2-apache
volumes:
- .:/app
ports:
- 80:80
environment:
YII_ENV: debug
PHP_USER_ID: 1000
I get this error:
ERROR: for union-folder_web_1 Cannot start service web: error while creating mount source path '/path/to/union-folder': mkdir /path/to/union-folder: file exists
For my purposes, this was finally fixed a few weeks ago in the edge channel, and got fixed for everyone in 2.2 - I forgot this issue existed, and will close it now that this is no longer a problem.
You probably want to file a new issue for your problem over on the main docker repo, since this is the "docker for windows" repo. Issues for Docker on a linux host are 100% guaranteed to be off-topic =)
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked
I'm tearing my hair out (what's left of it) over docker-compose crashing out with a "Cannot start service web: error while creating mount source path" error, reporting that it can't run
chown
, a command that isn't used anywhere in our codebase.I tried Windows 10 Pro x64 anniversary edition and creator edition, with stable and edge versions of Docker for Windows, and in all four cases things just plain old do not work. Things work on OSX, which isn't super useful when things only work on a too-small-to-seriously-dev-on macbook.
I'm trying to run start up the docker container we defined for https://github.com/mozilla/network-api, of which the relevant parts are the following.
Dockerfile
content:./scripts/prepare_container.sh
content:docker-compose.yml
content:docker-compose up --build
result:And that's it, no other information, and really nothing in that error that lets me google for something that helps me solve this problem. There is literally one result if you Google for
docker windows "Cannot start service" "error while creating mount source path" "no such file or directory"
, which is incredible =)