下载镜像
docker pull neo4j:3.5.22-community
编写配置文件
参考文档
编写docker-compose.yml文件
version: "3"services:neo4j:image: neo4j:3.5.22-communitycontainer_name: neo4j restart: alwaysports:- 7474:7474- 7687:7687environment:- NEO4J_AUTH:neo4j/neofj- TZ:Asia/Shanghaivolumes:- /etc/localtime:/etc/localtime:ro- /root/neo4j/data:/data- /root/neo4j/logs:/logs- /root/neo4j/conf:/var/lib/neo4j/conf- /root/neo4j/import:/var/lib/neo4j/importlogging:driver: "json-file"options:max-size: "10m"networks:default:external:name: my-docker-compose-network
一键启动
docker-compose up -d