一台服务器将docker image打包去另一天服务器安装这个镜像
一台服务器将docker image打到去另一天服务器安装这个镜像
- 1. 打包
- 2.另一台服务器执行
1. 打包
docker save -o nebula-graph-studio.tar harbor1.vm.example.lan/dockerio/vesoft/nebula-graph-studio
xxx.tar 是打包好的文件
后面的是 docker image
2.另一台服务器执行
docker load -i /root/nebula-graph-studio.tar
[root@hcss-ecs-2ff4 ~]# docker load -i /root/nebula-graph-studio.tar
d4fc045c9e3a: Loading layer [==================================================>] 7.667MB/7.667MB
aaad419b6686: Loading layer [==================================================>] 1.536kB/1.536kB
e0e11f0c451a: Loading layer [==================================================>] 78.43MB/78.43MB
2c839ee09ee4: Loading layer [==================================================>] 7.68kB/7.68kB
ed3cfb89d2a7: Loading layer [==================================================>] 5.632kB/5.632kB
Loaded image: harbor1.vm.example.lan/dockerio/vesoft/nebula-graph-studio:v3.10.0
[root@hcss-ecs-2ff4 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
harbor1.vm.example.lan/dockerio/vesoft/nebula-graph-studio v3.10.0 52eb2ad53a4c 9 months ago 85.8MB
[root@hcss-ecs-2ff4 ~]#
[root@hcss-ecs-2ff4 ~]# docker run -d --name nebula-graph-studio -p 7002:7001 vesoft/nebula-graph-studio
Unable to find image 'vesoft/nebula-graph-studio:latest' locally
latest: Pulling from vesoft/nebula-graph-studio
Digest: sha256:5c97db40af3ef5130a8cec8b7a4a499d5710779890a3ca5a3e7f016989bcf88e
Status: Downloaded newer image for vesoft/nebula-graph-studio:latest
8816874f078627b3e706a491a4eb5a9500ac7473baffa2883ea86d9c682c5300