Goals Running Neo4j with Docker is supported officially, both by Neo Technology and Docker. There is an official Docker image for Neo4j as well as more specific images provided by us. Detailed instructions are available at the linked repositories, which… Learn More →

neo4j docker image now in beta 235x300

Goals
Running Neo4j with Docker is supported officially, both by Neo Technology and Docker. There is an official Docker image for Neo4j as well as more specific images provided by us. Detailed instructions are available at the linked repositories, which we don’t want to duplicate here.
Prerequisites
You should have a sound understanding of both Docker and Neo4j, to leverage them effectively together.
Intermediate


General Observations

Docker is a lightweight virtualization mechanism to run single applications containerized and restricted on a Linux host system. Docker images are pre-built from dependent layers that build up the minimal setup required by the application or service to be run. Each layer is built from a simple text file (Dockerfile) that describes the operations to add the necessary filesystem-content on that layer. A docker image can be started immediately after downloading, in a few seconds. You can run as many docker image instances on your host as your resources allow, they are isolated from each other.

There are several ways to leverage Docker for your Neo4j deployment.

You can create throw-away Neo4j instances of many different versions for testing and running your applications. You can pre-seed containers with datasets, extensions and configurations.

Conflicting port and disk usage can be handled by mapping ports and volumes of multiple instances of the same container to different on the host system. Docker containers can be used as infrastructure layer, data containers or configuration providers.

Docker Store

We’re excited to have been chosen by the team at Docker to be included as a launch partner in the brand new Docker Store. Although it is still in limited beta, we wanted to share a bit on why we’re enthusiastic about the new Store and Docker as a platform for distribution and operations.

The new Docker Store means great things for Docker users – you’ll see Neo4j among other high-quality images, and have the ability to rate and review these images as well as provide feedback to the vendors. Perhaps most importantly, we’ll have the ability to push out new releases to you much faster through an automated publication workflow!

The official Neo4j Docker Image

Starting from Neo4j 2.3 we are happy to release official Neo4j Docker images, both for Neo4j Community as well as Enterprise Edition.

Developers at a wide variety of organizations have used the image, and we have over 1M+ pulls from the Docker repository.

Let us know what you end up doing with the Neo4j Docker image by mentioning #Docker and #Neo4j in your tweets!

It is offically supported both by Docker and Neo Technology. New versions will be made available with new Neo4j releases. Previous versions and milestones are available as tags in of the neo4j/neo4j image.

The Dockerfiles for the different versions are taken from this GitHub repository and synched with Docker Hub and the official repository as needed.

How to use the Neo4j Docker Image

For running Docker on Max OSX and Windows please consult the Docker documentation.
Neo4j 3.0
Neo4j 2.3

Neo4j 3.0 Docker Image

By default the Docker image exposes three ports for remote access:

  • 7474 for HTTP.
  • 7473 for HTTPS.
  • 7687 for Bolt.

It also exposes two volumes:

  • /data to allow the database to be persisted outside its container.
  • /logs to allow access to Neo4j log files.
docker run \
    --publish=7474:7474 --publish=7687:7687 \
    --volume=$HOME/neo4j/data:/data \
    --volume=$HOME/neo4j/logs:/logs \
    neo4j:3.0

Point your browser at http://localhost:7474 on Linux or http://$(docker-machine ip default):7474 on OS X.

All the volumes in this documentation are stored under $HOME in order to work on OS X where $HOME is automatically mounted into the machine VM. On Linux the volumes can be stored anywhere.

By default Neo4j requires authentication. You have to login with neo4j/neo4j at the first connection and set a new password.

For more details, see the Neo4j 3.1 Docker page.

Neo4j 2.3 Docker Image

The image exposes two ports (7474 and 7473) for HTTP and HTTPS access to the Neo4j API and a volume (/data) to allow the database to be persisted outside its container.

docker run \
    --publish=7474:7474 \
    --volume=$HOME/neo4j/data:/data \
    neo4j:2.3

Point your browser at http://localhost:7474 on Linux or http://$(docker-machine ip default):7474 on OSX.

All the volumes in this documentation are stored under $HOME in order to work on OSX where $HOME is automatically mounted into the machine VM. On Linux the volumes can be stored anywhere.
By default Neo4j requires authentication. You have to login with neo4j/neo4j at the first connection and set a new password.

For more details, see the Neo4j 2.3 Docker page.

Capabilities

The Neo4j Docker image comes with these capabilities:

  • configure memory usage
  • configure passwords or disable auth
  • configure file-descriptor limits and logical log retention
  • setup server extensions

The Enterprise Edition additionally provides:

  • run an high-availability cluster
  • access online-backup
  • advanced monitoring

Please read the information on Docker-Hub for detailed and latest documentation on features, configuration, cluster-setup and environment variables.

Enjoy using the Docker Image and please provide us feedback, via GitHub issues, Twitter or by dropping us an email.

The Neo4j Docker image is for example used in our live Neo4j Sandbox offering and the Graph your Twitter Network Demo.

Using the Neo4j Docker Image at Neo4j

We built the Graph Your Network application, scaling from a handful to hundreds of simultaneous Docker containers running Neo4j on Amazon ECS. This application allows users to load their Twitter activity into Neo4j and analyze it with the Cypher query language.

If you’re just looking to evaluate Neo4j, our Neo4j Sandbox uses a similar architecture.

Docker + Neo4j: A Long History

Our Developer Relations team launched the Community Edition Neo4j Docker image in beta in Spring 2015. After months of iterating based on the feedback from the community, our Engineering team launched the Official Repository, with support for both Community Edition and Enterprise Edition, including full cluster and high availability (HA) capabilities.

Neo4j – Spark – Analytics

As part of the Apache Spark integration for Neo4j-Mazerunner a default setup is provided by Kenny Bastani to install Spark, Hadoop, RabbitMQ and Neo4j with the Mazerunner extension using Docker.