-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to mount files inside a container #241
Comments
You can mount files inside containers same as with other Docker setups. That error seems to be saying that either |
yes, I saw that, which is what prompted my question. Neither of those is correct. Both project.conf and default.conf are files, not directories, so what I'm trying to do is mount a file over a file. |
Oh I see that the full path on the host is |
Yes, I modified my setup to share that volume, to no avail. The same error message occurred. I did some additional troubleshooting over the weekend. It appeared that the local directories containing project files were not being made available inside the containers, despite having modified my setup to share that volume with the VM. I also tried a couple of other projects that I have and those were failing as well. I have since uninstalled Dinghy, reinstalled Docker for Mac and reimplemented Docker Sync since I could not successfully launch any of the projects that I currently have on my Macbook Pro using Dinghy. |
Yeah in that case my first guess would be that the share path isn't getting switched over to that other host path as it should be. If you feel like digging into it at some point, you can |
I had the same issue, running |
For those wondering about this bug, even at this point in time... There's a situation where if you use Docker Windows (with docker-compose) and use certain credentials to "Share Drive" such as C:\ or D:\ etc., you may have to unshare, share the drive again, re-enter credentials, otherwise it gives you an error related like:
|
To build on @BaranOrnarli 's answer, the specific situation I encountered was my domain requiring that I change my account password. I went to docker settings -> Shared Drives . There I Reset my credentials, applied, unchecked my shared drives, applied, rechecked, apply, re-entered my credentials somewhere along the line, and eventually restarted my PC. Some of these steps may not be necessary, but this was the area that fixed it for me. :) |
And how to be the one who uses DockerToolbox?They dont have a options Share Drive" such as C:\ or D:\ |
So you have to do this sharing procedure each time you reboot the machine ? It is insane ! |
I'm a bit confused about the discussion from BaranOrnarli's comment onwards. It does not sound related to the original issue report. I have zero experience running Docker Windows on MacOS, and it's not something that Dinghy supports at this time. If somebody could describe in detail how their environment is set up with Dinghy to run Docker Windows and what exactly the error repo steps are, that could be very useful in tracking down the problem. |
I also stumbled upon this GitHub issue and Baran's answer above helped me solve my problem too! To respond to @codekitchen 's comments: The 1st hit was a (previously) unhelpful Stack Overflow Q&A and this page was the 2nd hit. For anybody using Docker for Windows, Baran's answer helped them, even if their problem had nothing to do with dinghy. I am not using dinghy myself either, just Docker for Windows. I added a variation of Baran's solution to the StackOverflow Q&A that was the 1st Google hit so that hopefully the next Docker for Windows user won't need to come here for a solution to their problem. |
@r3m0t 's tip worked for me; had the "not a directory" with rabbitmq's config files volume |
While I'm glad this answer has helped people, it has nothing to do with Dinghy or this filed issue and this really isn't the right place to have posted it. Please take the discussion to that StackOverflow answer instead, I'll delete any further discussion in here. |
Before filing a new issue, be sure to check the FAQ for answers to many common questions about Dinghy.
I just installed Dinghy and attempted to start the docker containers for an existing project using the existing docker-compose.yml file for the project. In that .yml file I am mounting a configuration file over the existing configuration file in my nginx container.
When attempting to launch the docker stack using Dinghy I get an error:
ERROR: for nginx Cannot start service nginx: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\\"/Volumes/MyDigitalSSD/src/project/docker/nginx/project.conf\\\" to rootfs \\\"/mnt/sda1/var/lib/docker/aufs/mnt/b1f83ff3d82fb1d429d9a8a3495bd294c4af88d95d276e22e5fcb52bd3434894\\\" at \\\"/mnt/sda1/var/lib/docker/aufs/mnt/b1f83ff3d82fb1d429d9a8a3495bd294c4af88d95d276e22e5fcb52bd3434894/etc/nginx/conf.d/default.conf\\\" caused \\\"not a directory\\\"\"" : Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
Does Dinghy not support mounting files inside containers? Are you limited to only mounting directories?
The text was updated successfully, but these errors were encountered: