Neo4j with Docker
Running Neo4j with Docker
docker run -p7474:7474 -p7687:7687 -e NEO4J_AUTH=neo4j/s3cr3t neo4j
# then open http://localhost:7474 to connect with Neo4j Browser
What is Docker
Docker is a lightweight virtualization mechanism to run single applications or processes in a containerized environment on a Linux host system. It is designed to handle a small piece of functionality in each container and scale according to needs. Docker containers can be used as infrastructure layers, data containers, or configuration providers.
The containers are built from images that can be vendor-provided or user-defined.
To build a Docker image, you create a specification file (Dockerfile
) to define the minimum-required, dependent layers for the application or service to run.
The steps in the Dockerfile describe the operations for adding the necessary filesystem content for each layer.
You can run as many Docker instances on your host as your resources allow because each container is isolated from any others.
The official Neo4j Docker Image
Neo4j provides and maintains official Neo4j Docker images on DockerHub for both Neo4j Community and Enterprise editions. Releases for current and previous versions of the image are also provided. A list of the previous versions is available under the tags section of the DockerHub page.
How to use the Neo4j Docker Image
There are several ways to leverage Docker for your Neo4j development and deployment. You can create throw-away Neo4j instances of many different versions for testing and running your applications. You can also pre-seed containers with datasets, extensions, and configurations for interaction and processing.
The step-by-step instructions on starting Docker containers for Neo4j are given in our how-to guide. There is also documentation in our operations manual on running Neo4j with Docker and how to configure it, run clusters, and handle security.
By default, the docker image does not have certificates installed. This means that you will need to disable encryption when connecting with a driver. |
Evaluating Neo4j on Docker
We also use Neo4j on Docker internally for some of our tools and functionality. From building solutions to live demos, deploying Neo4j with Docker is a valuable capability. Probably our best-known examples of Neo4j deployed with Docker containers are the Neo4j Sandboxes. These sandboxes are Neo4j instances in Docker containers running on a shared cloud server. Each sandbox is independent and separated from the others, allowing users to spin up contained environments for trying out and testing Neo4j!
In each sandbox use case, we specify certain configurations, data sets, and extensions/plugins to include, and each user’s queries and exploration is specific to that assigned container. Once the life of a Neo4j Sandbox is complete (maximum of 10 days), the container is shut down. If you want to see how Neo4j works in a Docker container, go ahead and create a Neo4j Sandbox. Note that we do have some configuration presets to restrict certain access and limit functionality.
Was this page helpful?