Creating Docker containers with nodes of cluster
Creating Docker containers with nodes of cluster
REPOSITORY TAG IMAGE ID CREATED SIZE
couchdb20 latest 25a0a1522fcf 2 days ago 624.5 MB
docker run -dit --name couchdb_node1 couchdb20 bash \
> && docker run -dit --name couchdb_node2 couchdb20 bash \
> && docker run -dit --name couchdb_node3 couchdb20 bash
bf3e284c72cc37304e57da837ff1365b8aaec88eab754b7d74248cadb3491660
898ac8ef3ecb213b2e5d178604f1f4176d39f00bd71ba86615b78df733093c43
ee1b24634918762da91f7e612a963a2d811cbc0b3e59e53cc11bf3ef7b1ee432
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ee1b24634918 couchdb20 "/couchdb/bin/couchdb" 39 seconds ago Up 32 seconds 4369/tcp, 5984/tcp, 5986/tcp, 9100-9200/tcp couchdb_node3
898ac8ef3ecb couchdb20 "/couchdb/bin/couchdb" 47 seconds ago Up 39 seconds 4369/tcp, 5984/tcp, 5986/tcp, 9100-9200/tcp couchdb_node2
bf3e284c72cc couchdb20 "/couchdb/bin/couchdb" 55 seconds ago Up 47 seconds 4369/tcp, 5984/tcp, 5986/tcp, 9100-9200/tcp couchdb_node1
docker network ls
NETWORK ID NAME DRIVER SCOPE
056d7fa20dee bridge bridge local
142b44d5cb03 host host local
3a1b96434947 none null local
[sergey@fcbs8200 ~]$ docker network inspect 056d7fa20dee
[
{
"Name": "bridge",
"Id": "056d7fa20dee49d2db44e13672edaeadc2d4128694034ad72ed7655c11331981",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.17.0.0/16",
"Gateway": "172.17.0.1"
}
]
},
"Internal": false,
"Containers": {
"898ac8ef3ecb213b2e5d178604f1f4176d39f00bd71ba86615b78df733093c43": {
"Name": "couchdb_node2",
"EndpointID": "1a8b64f49939643e69fd6c624a7d5d57ee31b7f2111c9ee7785148c71143b36f",
"MacAddress": "02:42:ac:11:00:03",
"IPv4Address": "172.17.0.3/16",
"IPv6Address": ""
},
"bf3e284c72cc37304e57da837ff1365b8aaec88eab754b7d74248cadb3491660": {
"Name": "couchdb_node1",
"EndpointID": "e532d36d4f017ca6935b5250c1b6d3c9afa53e91fbd4719d53a30fe1d4eef24c",
"MacAddress": "02:42:ac:11:00:02",
"IPv4Address": "172.17.0.2/16",
"IPv6Address": ""
},
"ee1b24634918762da91f7e612a963a2d811cbc0b3e59e53cc11bf3ef7b1ee432": {
"Name": "couchdb_node3",
"EndpointID": "fc65657217786977f22537fbf0275725a627c73225ec8934fb49857473576c96",
"MacAddress": "02:42:ac:11:00:04",
"IPv4Address": "172.17.0.4/16",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
Comments
Post a Comment