其他分享
首页 > 其他分享> > docker容器跨主机网络overlay

docker容器跨主机网络overlay

作者:互联网

前提:已部署好docker服务
服务预计部署情况如下
10.0.0.134 Consul服务
10.0.0.135 host1
10.0.0.134 host2
host1与host2通过Consul这个key-value数据库,来报错网络状态信息,用于跨主机容器间通信。包括Network、Endpoint、IP等。其它数据库还可以使用Etcd,Zookeeper

拉取镜像,运行容器

[root@mcw4 ~]$ docker run -d -p 8500:8500 -h consul --name consul progrium/consul -server -bootstrap
Unable to find image 'progrium/consul:latest' locally
latest: Pulling from progrium/consul
Image docker.io/progrium/consul:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
c862d82a67a2: Already exists 
0e7f3c08384e: Already exists 
0e221e32327a: Already exists 
09a952464e47: Already exists 
60a1b927414d: Already exists 
4c9f46b5ccce: Already exists 
417d86672aa4: Already exists 
b0d47ad24447: Pull complete 
fd5300bd53f0: Pull complete 
a3ed95caeb02: Pull complete 
d023b445076e: Pull complete 
ba8851f89e33: Pull complete 
5d1cefca2a28: Pull complete 
Digest: sha256:8cc8023462905929df9a79ff67ee435a36848ce7a10f18d6d0faba9306b97274
Status: Downloaded newer image for progrium/consul:latest
3fc6e630abc28f4add16eb8448fa069dfd52eab0c2b1b6a4f0f5cbb6311f4f9f
[root@mcw4 ~]$ cat /etc/docker/daemon.json  #由于拉取镜像总是各种卡住不动,于是添加了后两个镜像加速地址,重启docker之后,很快就拉取成功了
{"registry-mirrors":["https://reg-mirror.qiniu.com/","https://docker.mirrors.ustc.edu.cn/","https://hub-mirror.c.163.com/"]}

 

标签:Pull,Already,complete,exists,overlay,主机,consul,docker
来源: https://www.cnblogs.com/machangwei-8/p/15757120.html