Change Graph.db location on Neo4j Docker to local file

I have been following this tutorial www.kennybastani.com I am looking to integrate my NEo4j database with the Dockerized version described in the tutorial. The Dockerized version provides an interface between Neo4j and Spark GraphX. I am new to Docker.

Steps taken:

  • No suitable driver found for jdbc:postgresql when trying to connect spark-shell (inside a docker container) to my PostgreSQL database
  • Docker PHP image. lstat docker-php-source: no such file or directory
  • Minikube: how to ssh into the VM?
  • Docker Compose: Allow images to access host resources (like postgresql)
  • Keeping a Play framework app running in a Docker container without a pseudo-TTY
  • Reading and writing files with dockerimage
    1. export DOCKER_HOST=tcp://$(boot2docker ip 2>/dev/null):2375
    2. $(boot2docker shelling)
    3. docker run --env DOCKER_HOST=$DOCKER_HOST \
      --env DOCKER_TLS_VERIFY=$DOCKER_TLS_VERIFY \
      --env DOCKER_CERT_PATH=/docker/cert \
      -v $DOCKER_CERT_PATH:/docker/cert \
      -ti kbastani/spark-neo4j up -d

    4. At this point I have no issues running Neo4j in the container and as a test I imported the demo dataset: :play movies

    5. I want to change the location of the dockerized Graph.db to my local one.

    Attempt 1:

    I tried running the container with:

    docker run --env DOCKER_HOST=$DOCKER_HOST \
    --env DOCKER_TLS_VERIFY=$DOCKER_TLS_VERIFY \
    --env DOCKER_CERT_PATH=/docker/cert \
    —v /usr/local/Cellar/neo4j/3.0.3/libexec/data/databases/graph.db:opt/data \
    -ti kbastani/spark-neo4j up -d

    The réponse I get is: docker: Error parsing reference: "—v" is not a valid repository/tag. I also tried with --volume <path-here>

    Attempt 2:

    1. Logged into the container and opened: neo4j-server.properties
    2. Edit org.neo4j.server.database.location=opt/data to point to my local Graph.db.

    Unfortunately, no luck with either solution.

    Background:

    I am looking to implement k-means streaming in Apache Spark to cluster bitcoin transactions in realtime. The stack is involves, Neo4j, Spark, Flask.

  • Docker exits with a exit code on starting
  • Enable PAM configuration (limits.conf) for a running daemon
  • Using Spinnaker to deploy a Docker image from dockerhub to Aws Eb
  • Automate Deployment of Docker
  • docker service update vs docker stack deploy with existing stack
  • Docker tutum/wordpress container issues with apache2 and supervisor
  • One Solution collect form web for “Change Graph.db location on Neo4j Docker to local file”

    The -v in your text above doesn’t look like the same – as in the -ti. Try retyping it (it may have unicode in it that’s causing issues). Also, do just physical_path:/data as the location, and you could even type out –volume=physical_path:/data

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.