Skip to content

can't map mongo data directory of a window image in window host #1348

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

Closed
tungjb opened this issue Oct 30, 2018 · 5 comments
Closed

can't map mongo data directory of a window image in window host #1348

tungjb opened this issue Oct 30, 2018 · 5 comments

Comments

@tungjb
Copy link

tungjb commented Oct 30, 2018

I got an error when map mongo data directory of a window image in window host

docker run -ti -p 27017:27017 -v c:/temp/mongo:c:/data dockermongo
docker: Error response from daemon: container c35916e043fe3607a2666ee7d0db66b78fb0164cea6d47c7aeab8e524edc0ea3 encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106).

This is the image that I used:
https://github.com/docker-library/mongo/blob/32e5645325ae5dff2ae6f934049cbd6b4635aec0/3.6/windows/windowsservercore-1709/Dockerfile

In the above link, there is a note about mapping issue. However, it seems like the issue has been fixed by virtualbox and also by mongo.

Any idea whether it is possible to map the data directory in window host?

@wglambert
Copy link
Contributor

If you're using Linux Containers on Windows(LCOW) there are contraindications related to NTFS and Docker's Overlay2 and AUFS

NTFS is still unsupported by Docker moby/moby#23930 (comment) however LCOW attempts to overcome this https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-containers#Bind-mounts with Hyper-V POSIX translations and it seems you've run into an error where a Windows system call wasn't translated, so I would discern that mongo is unsupported for LCOW

You should still be able to let Docker manage your volume as a named volume, this is the alternative to a bind-mount: MariaDB/mariadb-docker#152 (comment)

@wglambert
Copy link
Contributor

Actually I skipped over your use of mongo:windowsservercore-1709 so my above comment is not very relevant.

There is an ongoing issue related to your error message on container start docker/for-win#676 and a comment in the thread notes that mounting the volume to a populated folder will give the error docker/for-win#676 (comment) but it seems this is if the volume is "baked into the image" so in a Dockerfile. Others in the thread mention getting this error from just simply mounting the volume in a docker-compose.yml, just the same as a docker run -v like your own usage

You're using the image dockermongo, is this a Dockerfile you've built?

@tungjb
Copy link
Author

tungjb commented Oct 30, 2018

Hi @wglambert, thanks for your answer. dockermongo is built using Dockerfile 3.6.8-windowsservercore-1709 without any changes. I try to create the mapping after that. So, I will need to check if it can work in a linux base image on linux.

@tianon
Copy link
Member

tianon commented Oct 30, 2018

This isn't really the appropriate place to file this -- this repository is for the documentation of the official images.

For help debugging your deployment/implementation/environment, I'd recommend trying the Docker Community Forums, the Docker Community Slack, or Stack Overflow.

@tianon tianon closed this as completed Oct 30, 2018
@tungjb
Copy link
Author

tungjb commented Oct 31, 2018

Sure. Noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants