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:

  • docker build on a private git repo containing the Dockerfile?
  • Monitor docker containers based on labels assigned
  • Why getting ExceptionInInitializerError using orElseThrow
  • docker tool box docker build behind proxy is not working in windows
  • Dockerfile: why doesn't the bash command work?
  • Using Ansible,Jenkins and docker to build fast test environments
    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.

  • Error connecting to VPN within Docker container
  • How to run a shell script using dockerfiles CMD
  • What are the option to API gateway with docker?
  • docker build taking too much time in aws ecs
  • Dockerfile built-in environment variables documentation
  • postgres pg_basebackup can't find .pg_pass file
  • 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.