docker-agraph icon indicating copy to clipboard operation
docker-agraph copied to clipboard

data volume

Open arademaker opened this issue 8 years ago • 11 comments

Following the http://franz.com/agraph/docker/, I would expect being able to use a data volume. But run.sh is not using --volumes-from, right? Why the Dockerfile.data file anyway ?

arademaker avatar Mar 30 '16 23:03 arademaker

First off, great to see AllegroGraph available via Docker!

Not sure how similar my own observation is with @arademaker's, but I'm looking into using the agraph container and was actually expecting to be able to specify a host volume for my data directly (eg., something like -v /my/data/dir:/data, not another container. What specifically would be the benefit of using a container for the data if in general you want the data to be on the host machine? I've been a long time (and happy) AllegroGraph user, but I'm just starting with Docker, so apologies if any of this doesn't make much sense. I'd appreciate any clarifications of course in the context of AllegroGraph.

carueda avatar Apr 07 '16 19:04 carueda

Information added to the documentation on data volumes.

@carueda the host volumes only work on Linux and that's not our market for this. Mac and Windows are, and they don't work there. See the new documentation and let us know (at [email protected]) if you have more questions. We don't really answer the questions here with regularity.

franzinc avatar Apr 20 '16 17:04 franzinc

@franzinc host volumes work on Mac too! I am using them. @carueda , you are thinking only in your devel environment. Once you need to upload the containers to a cloud service like IBM Bluemix or others, you will need a data volume to make your data persistent.

I am still missing more information in the README file of this repo. The run.sh script is not using the data container created my the make command.

arademaker avatar Apr 20 '16 19:04 arademaker

@arademaker I misspoke. The example @carueda gave, which was -v /my/data/dir:/data will not work on Mac or Windows. This use of -v is mapping a local directory to be available inside the agraph container.

You are right, the run.sh script isn't as up to date as the docs. I'll do that.

franzinc avatar Apr 20 '16 19:04 franzinc

run.sh updated.

franzinc avatar Apr 20 '16 19:04 franzinc

Thanks @arademaker and @franzinc .

Just couple of additional "quick" comments; I appreciate your time so no need to reply as I still need to learn more in Docker land.

  • Right, I'm still more focused on development so no persistence is OK for now.
  • Although I use MacOS for development, my question was in fact in the context of Linux, but I do note that "...Linux ...'s not our market for this."
  • "-v ... will not work on Mac or Windows." Is it because of some limitation in VirtualBox, perhaps the same or similar to the one that prevents one from using it for MongoDB?

carueda avatar Apr 20 '16 21:04 carueda

-v mapping a local (OS X) directory doesn't work because the VirtualBox layer doesn't support it. The local data container works, though, since that is a native Linux filesystem inside the container.

I'm unfamiliar with the MongoDB issue. I would assume they could use a data container.

franzinc avatar Apr 20 '16 23:04 franzinc

@franzinc you are wrong, sorry! The -v options is working on my Mac! I am using a container running ubuntu and with a host directory mounted in the container !

arademaker avatar Apr 20 '16 23:04 arademaker

@franzinc I've actually been using -v with VirtualBox on Mac without any problem (but not for MongoDB).

It is under particular services (like MongoDB) where -v won't work apparently because, at least in part, of a long known VirtualBox limitations.

From: https://hub.docker.com/_/mongo/

WARNING (Windows & OS X): The default Docker setup on Windows and OS X uses a VirtualBox VM to host the Docker daemon. Unfortunately, the mechanism VirtualBox uses to share folders between the host system and the Docker container is not compatible with the memory mapped files used by MongoDB (see vbox bug, docs.mongodb.org and related jira.mongodb.org bug). This means that it is not possible to run a MongoDB container with the data directory mapped to the host.

carueda avatar Apr 20 '16 23:04 carueda

@carueda @arademaker That's pretty strange, since I remember reading statements to the contrary, but I give.

Thanks, @carueda for the MongoDB reference. Yes, I think AllegroGraph uses the memory mapped files, too.

Btw, I'm off for a couple of days, so I'll read/reply Monday.

franzinc avatar Apr 21 '16 02:04 franzinc

Any update here?

arademaker avatar Sep 04 '18 18:09 arademaker