Config file for Neo4j Docker Image

2019-04-07 00:05发布

I installed neo4j-3.0 as a docker image in Mac OSX. Where can I locate the config file for neo4j ?

1条回答
Melony?
2楼-- · 2019-04-07 01:01

They have a dedicated section on their page for that ...

There are 3 ways: via environment variables, mounting a /conf volume and building a new image

The /conf volume is probably the way the OP wants:

To make arbitrary modifications to the Neo4j configuration, provide the container with a /conf volume.

docker run \
    --detach \
    --publish=7474:7474 --publish=7687:7687 \
    --volume=$HOME/neo4j/data:/data \
    --volume=$HOME/neo4j/logs:/logs \
    --volume=$HOME/neo4j/conf:/conf \
    neo4j:3.1

Any configuration files in the /conf volume will override files provided by the image. This includes values that may have been set in response to environment variables passed to the container by Docker. So if you want to change one value in a file you must ensure that the rest of the file is complete and correct.

To dump an initial set of configuration files, run the image with the dump-config command.

docker run --rm\
    --volume=$HOME/neo4j/conf:/conf \
    neo4j:3.1 dump-config
查看更多
登录 后发表回答