当前位置:   article > 正文

docker 部署 neo4j_neo4j:latest

neo4j:latest

1. 获取neo4j镜像

拉取镜像

test@yfq image_detection % docker pull neo4j

Using default tag: latest
latest: Pulling from library/neo4j
latest: Pulling from library/neo4j
7d97e254a046: Pull complete 
732d09690fed: Pull complete 
e8cba66f5b65: Pull complete 
9e41d761a8cf: Pull complete 
33a66ada74dc: Pull complete 
Digest: sha256:eb36a96ef2d67050c92ca53109f10e0f24ac920971e58cdd0bf81aaec84a02e9
Status: Downloaded newer image for neo4j:latest
docker.io/library/neo4j:latest
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

检查拉到的镜像

test@yfq neo4j % docker images | grep neo4j

neo4j           latest    e03a2a7d1b29   5 days ago    495MB
  • 1
  • 2
  • 3

2. 创建容器,部署neo4j

编写 docker-compose.txt 文件

version: '2.4'
services:
     spread:
      image: 'neo4j:latest'
      #restart: always
      container_name: neo4j_v1
      ports:
        - 7474:7474
        - 7687:7687
      volumes:
        - /data/neo4j/:/neo4j/  # 映射为自己的目录
      working_dir: /neo4j/
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

启动容器

docker-compose -f docker-compose.txt up -d
  • 1

查看容器运行状态和日志

testo@yfq neo4j % docker ps | grep neo4j_v1

2c0466b641b1   neo4j:latest   "tini -g -- /startup…"   13 minutes ago   Up 13 minutes   0.0.0.0:7474->7474/tcp, 7473/tcp, 0.0.0.0:7687->7687/tcp   neo4j_v1
  • 1
  • 2
  • 3
test@yfq neo4j % docker logs -f --tail 100 neo4j_v1
        
2023-09-12 09:38:40.651+0000 INFO  Starting...
2023-09-12 09:38:41.673+0000 INFO  This instance is ServerId{9fdb69c7} (9fdb69c7-64a7-44dd-b064-424c7b2f4bc7)
2023-09-12 09:38:42.500+0000 INFO  ======== Neo4j 5.11.0 ========
2023-09-12 09:38:44.810+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2023-09-12 09:38:45.732+0000 INFO  Remote interface available at http://localhost:7474/
2023-09-12 09:38:45.735+0000 INFO  id: 15BD17FE10F86D426C3FF13E7CE65FC6406D375DB32DC6CE3F8420F61F9DCFFA
2023-09-12 09:38:45.736+0000 INFO  name: system
2023-09-12 09:38:45.736+0000 INFO  creationDate: 2023-09-12T09:38:43.159Z
2023-09-12 09:38:45.736+0000 INFO  Started.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

查看neo4j部署情况

浏览器输入:http://localhost:7474/browser/
在这里插入图片描述

neo4j部署完成

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/码创造者/article/detail/768084
推荐阅读
相关标签
  

闽ICP备14008679号