Michael Quinn
Michael Quinn

Reputation: 51

Neo4j Docker Config file

Running Neo4j 3.1 community edition in docker container on: Virtual Box host : Windows 10 Professional Virtual Box Guest : RHEL 7.2 -3.10.0-514.6.1.el7.x86_64 #1 SMP EST 2016 x86_64 x86_64 x86_64 GNU/Linux Docker version 1.13.0, build 49bf474

Run with conf directory inside docker image, ie

export NEO4J_DATA=/home/dpdev/dockerConfigs/Neo4j/data
export NEO4J_LOGS=/home/dpdev/dockerConfigs/Neo4j/logs
export NEO4J_CONF=/home/dpdev/dockerConfigs/Neo4j/conf
export NEO4J_NAME=DPDev-neo4j
docker run \
    --name=dpdev-Neo4j \
    --publish=7474:7474 \
    --publish=7687:7687 \
    --volume=$NEO4J_DATA:/data \
    --volume=$NEO4J_LOGS:/logs \
    neo4j:3.1

all works fine and I can access the admin on http://localhost:7474 inside the RHEL guest (docker host) but

docker run \
    --name=dpdev-Neo4j \
    --publish=7474:7474 \
    --publish=7687:7687 \
    --volume=$NEO4J_DATA:/data \
    --volume=$NEO4J_LOGS:/logs \
    --volume=$NEO4J_CONF:/conf \
    neo4j:3.1

I cannot access the admin console as before on http://localhost:7474, when the conf file is on the docker host, rather than inside the docker image

NOTE: I am using the config file from the Neo4j dump command (no changes at all)

Upvotes: 5

Views: 700

Answers (1)

Gabriel Preda
Gabriel Preda

Reputation: 1

It might be helpful to try using host.docker.internal instead of localhost, perhaps it routes differently in each scenario.

Upvotes: 0

Related Questions