3.4. Docker specific operations

This chapter describes various operations that are specific to running Neo4j in a Docker container.

3.4.1. Using /plugins

To install user-defined procedures, provide a /plugins volume containing the jars.

docker run --publish=7474:7474 --publish=7687:7687 --volume=$HOME/neo4j/plugins:/plugins neo4j:3.5

See Java Reference → Procedures for more details on procedures.

3.4.2. Using Cypher Shell

The Neo4j Shell can be run locally within a container using a command like this:

docker exec --interactive --tty <container> bin/cypher-shell

To determine the <container>, you can run docker ps to list the currently running Docker containers. From the results, use the CONTAINER ID in place of <container>.

To pass a local file into Cypher Shell, you can run the following, again using the CONTAINER ID identified above to replace <container>:

cat <local-file> | sudo docker exec --interactive <container> bin/cypher-shell -u <username> -p <password>

When you run the above, the contents of the <local-file> will be passed into the Docker container.

It will then run bin/cypher-shell, and authenticate with the provided <username> and <password>.

For more information on using Cypher Shell, see Section 12.10, “Cypher Shell”.

3.4.3. Upgrading Neo4j on Docker

To enable upgrades, set NEO4J_dbms_allow__upgrade to true. For more details on upgrading, see: