Official Repository

Last pushed: 2 days ago
Short Description
Neo4j is a highly scalable, robust native graph database.
Full Description

Supported tags and respective Dockerfile links

Quick reference

What is Neo4j?

Neo4j is a highly scalable, robust, native graph database. It is used in mission-critical apps by thousands of leading startups, enterprises, and governments around the world. You can learn more here.

How to use this image

Start an instance of neo4j

You can start a Neo4j container like this:

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

which allows you to access neo4j through your browser at http://localhost:7474.

This binds two ports (7474 and 7687) for HTTP and Bolt access to the Neo4j API. A volume is bound to /data to allow the database to be persisted outside the container.

By default, this requires you to login with neo4j/neo4j and change the password. You can, for development purposes, disable authentication by passing --env=NEO4J_AUTH=none to docker run.

Note on version 2.3

Neo4j 3.0 introduced several major user-facing changes, primarily the new binary Bolt protocol. This is not available in 2.3 and as such, there is no need to expose the 7687 port. Due to changes made to the structure of configuration files, several environment variables used to configure the image has changed as well. Please see the 2.x specific section in the manual for further details.

You can start an instance of Neo4j 2.3 like this:

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

Documentation

For more examples and complete documentation please go here for 2.x and here for 3.x.

Docker Pull Command

Comments (10)
geostant
a month ago

Editing neo4j.conf with a bigger heap_size and cache and restarting the container result in going back to the default 512M

hleb
3 months ago

Update to previous comment: with latest image (3.1.3), python bolt client fails with TLSV1_ALERT_INTERNAL_ERROR , so I probably have to deploy custom SSL certificates to both containers.

hleb
3 months ago

Hi, guys!

There's a strange issue with image 3.1.1

On my development machine, I have it cached some time ago:

$ docker images | grep neo4j | grep 3.1.1
neo4j                                           3.1.1               c025ec4f36b1        8 weeks ago         199 MB

On newly provisioned digital ocean machine, it has another Hash ID

# docker images | grep neo4j | grep 3.1.1
neo4j                                           3.1.1               e17e2eea5d13        3 weeks ago         172 MB

With "old" image, python bolt client works just fine, and TLS negotiation succeeds. E.g. when I issue the following command from the linked container, I can see a certificate chain.

# openssl s_client -connect neo4j:7687
CONNECTED(00000003)
depth=0 CN = 0.0.0.0
verify error:num=18:self signed certificate
verify return:1
depth=0 CN = 0.0.0.0
verify return:1
---
Certificate chain
 0 s:/CN=0.0.0.0
   i:/CN=0.0.0.0
---
Server certificate
-----BEGIN CERTIFICATE-----
MIICpzCCAY+gAwIBAgIJAMXylgnQIYKzMA0GCSqGSIb3DQEBDQUAMBIxEDAOBgNV
BAMMBzAuMC4wLjAwIBcNMTYwMzMwMTUzMzMzWhgPOTk5OTEyMzEyMzU5NTlaMBIx
EDAOBgNVBAMMBzAuMC4wLjAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQDygCAIJ2rZRh3UAigYJKHUGv2du0iP+AlBy0jWFhAT9A8x66lC8D/89+nbGGY2
8rtjqUo4Zp3qc5QGxrOe/TMDzty5uc6AObfj5iNP02aLVPXYn6TAW/e7FSiBrNV+
HWmEgRFO8WCjLUoK6mmdeIl5EIRn/iud36NEuOUVsSUukElp/dglL9u/mJ5kaRgE
ApfhZ6Kd3bJ5wXh6/cLTMlH8TDGpOdCJeeFwMfvU7i3pU39ZZ7uj3y2JFBFMeyrQ
s03xaKalGvDSKNQRhSV6GFho2v0YRVS23u7cgI37/4XMBt5uXhJfVKD0KLlVTI2z
enkB7pOB9I60KbJqRzyc7wshAgMBAAEwDQYJKoZIhvcNAQENBQADggEBAAqTpbJx
7lQ65eYqzhseX2ETOa0ob/pPyV9NQeAQOmRRLn4b7Sbn0ul0zKZxA9dnvXYGeLmy
JYPT97+ffjxIc3Zf6UQXMT18DVTNCkrhOgWWc0ZEATLGqlNxu0myVKpE+k+3JgQO
x8PcMp9AgQqS8kWqGy0HReVw3JZ/U7ZdMiY1DwVjfjQxCumn3LqUgxF//aCJezWV
s5Eq1alQLlUpWdvKF6WwoZZd0oN9DaUcYMvChSKm1HVMbEy/OHphkEriNhCQ0fFB
lH3oGbCiIKd4L5lEXevqmnIaz/aj2wZG4CH5Zx+P5zHkP4dRQCsXuWW1JGM0pzF6
IZ8LBR7QuyL72s0=
-----END CERTIFICATE-----
subject=/CN=0.0.0.0
issuer=/CN=0.0.0.0
---
No client certificate CA names sent
---
SSL handshake has read 1271 bytes and written 519 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-SHA
    Session-ID: 58DD2884FD0B8A09A9982DABB58240C019F8C4D540855A6A88B02DA0E075AB36
    Session-ID-ctx: 
    Master-Key: 19D203E050EC82C961772A0F2207AF36F67ABB2876231C7AD6A235B9DFDD34CF44CA7A6C9F694F2E845C3E89F252864A
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1490888836
    Timeout   : 300 (sec)
    Verify return code: 18 (self signed certificate)
---

But when I launch the same configuration on DO machine with a newer image, SSL handshake stucks forever (command above only says "CONNECTED...", and python code using bolt protocol just hangs in ssl handshake)

On the first glance it looks like a serious build regression, pretty painful.

Am I doing something wrong?

isaacuribe
3 months ago

@mmcfarland

Sure, you can create a "Dockerfile" with something like this as the first line:

FROM neo4j:3.0

Help is here: https://docs.docker.com/engine/reference/builder/#from

mmcfarland
10 months ago

Hi! I'm new with docker, is there any way to get a neo4j instance without using docker run and using a Dockerfile instead?

mmcfarland
10 months ago

Does anyone know how to set this up with AWS?

benbc
a year ago

@dulfox Please can you create a Github issue explaining what you need?

dulfox
a year ago

I would have the ability to add some proxy settings to load CSV from the web

benbc
2 years ago

@xenoterracide We expose a subset of the configuration options as environment variables (see the section "Environment variables" in the repo description). If that's not enough then you can change arbitrary configuration options by providing your own config files (see the section "/conf volume" in the repo description).

xenoterracide
2 years ago

being new to neo4j, how do you tweak the configuration file of neo4j with this image?