Hi Martin,

The key is to use a "persistent container" to store the data.  There are 
several ways of doing this (most people use a very small image like 
BusyBox), but I use the ArangoDB container so that I have access to all the 
tools if necessary.  Here's what I use to create the persistent data 
container:


docker create \
  --name arangodb-persist \
  --entrypoint /bin/sh \
  -v /var/log/arangodb3 \
  -v /var/lib/arangodb3 \
  -v /var/lib/arangodb3-apps \
  -v /etc/arangodb3 \
  arangodb/arangodb:3.6.3 true


The key for this is changing the "entrypoint" to /bin/sh and issuing the 
"true" command at the end.  This uses the shell to evaluate the "true' 
statement and exits without starting the DB services.  Also, I specify the 
volumes I want to export (with the -v flag).

Then, you can map/use those exported volumes in the application service 
like this:


docker run \
  --name arangodb \
  --volumes-from arangodb-persist \
  -e ARANGO_ROOT_PASSWORD=somepassword \
  -e ARANGO_STORAGE_ENGINE=rocksdb \
  -v /etc/arangodb3/arangod.db.conf:/etc/arangodb3/arangod.conf \
  arangodb/arangodb:3.6.3 --configuration /etc/arangodb3/arangod.conf


Here, I'm also specifying the arangod.conf file, which I maintain outside 
the container.

Now, you can start/stop/destroy the "arangodb" application container 
without losing any data.  Also, you can upgrade the app without upgrading 
the data container - the built-in tools will be out-of-date, but you would 
only use those in a dire emergency anyway.

Persistent containers have a lot of other advantages, just browse the 
interwebs 
<https://duckduckgo.com/?q=docker+using+persistent+container+for+data+storage&atb=v192-1&ia=web>
 
and you'll find a bunch of great info.

Cheers,
Kerry


On Tuesday, May 19, 2020 at 12:37:03 PM UTC-7, Martin Krc wrote:
>
> Hi,
>
> I am using Docker ToolBox on my Windows (Home) machine. I tried to deploy 
> ArangoDB there today, but did not manage to do it in the way that keeps 
> data between restarts of the docker virtual machine. The problem is that 
> when I connect a folder within the virtual machine to a real folder, 
> ArangoDB will complain about file system upon startup (mentioning NFS). My 
> question: Is there any way how to get around this issue?
>
> Martin
>

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/arangodb/b5227a77-46c0-4894-90e0-f142b507cdda%40googlegroups.com.

Reply via email to