Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Running Neo from a Docker Container

docker run --rm -it -p 7474:7474 -p 7687:7687 --env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes -v //c/Users/selvy/docker-stuff/vm_share/neo4j:/data neo4j:enterprise

Overriding the values in neo4j.conf

This is done by using docker environment variables. See here for more details

4.2.1. Environment variables

Pass environment variables to the container when you run it.

docker run \
    --detach \
    --publish=7474:7474 --publish=7687:7687 \
    --volume=$HOME/neo4j/data:/data \
    --volume=$HOME/neo4j/logs:/logs \
    --env NEO4J_dbms_memory_pagecache_size=4G \
    neo4j:4.1

Any configuration value (see Section A.1, “Configuration settings”) can be passed using the following naming scheme:

  • Prefix with NEO4J_.

  • Underscores must be written twice: _ is written as __.

  • Periods are converted to underscores: . is written as _.

As an example, dbms.tx_log.rotation.size could be set by specifying the following argument to Docker:

--env NEO4J_dbms_tx__log_rotation_size

Variables which can take multiple options, such as dbms_jvm_additional, must be defined just once, and include a concatenation of the multiple values. For example:

--env NEO4J_dbms_jvm_additional="-Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=$HOME/conf/jmx.password -Dcom.sun.management.jmxremote.access.file=$HOME/conf/jmx.access -Dcom.sun.management.jmxremote.port=3637"

Our Script

 docker run --rm -it -p 7474:7474 -p 7687:7687 --env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes -v //c/Users/selvy/docker-stuff/vm_share/neo4j:/data -e NEO4J_dbms_connector_bolt_enabled=true -e NEO4J_dbms_connector_bolt_listen__address=0.0.0.0:7687 -e NEO4J_dbms_connector_http_enabled=true -e NEO4J_dbms_connector_http_listen__address=0.0.0.0:7474 -e NEO4J_dbms_connector_https_listen__address=0.0.0.0:7473 neo4j:enterprise
  • No labels