Single node docker run -d -p 2379:2379 -p 2380:2380 seanswlin/etcd
Cluster - Node1
docker run -d -p 2379:2379 -p 2380:2380 -v /opt/etcd1:/var/lib/etcd seanswlin/etcd
--name ETCD1
--data-dir /var/lib/etcd
--initial-advertise-peer-urls http://${NODE1_IP}2380
--listen-peer-urls http://0.0.0.0:2380
--listen-client-urls http://0.0.0.0:2379
--advertise-client-urls http://${NODE1_IP}:2379
--initial-cluster ETCD1=http://${NODE1_IP}:2379,ETCD2=http://${NODE2_IP}:3002
--initial-cluster-state new
Cluster - Node2
docker run -d -p 2379:2379 -p 2380:2380 -v /opt/etcd1:/var/lib/etcd seanswlin/etcd
--name ETCD2
--data-dir /var/lib/etcd
--initial-advertise-peer-urls http://${NODE2_IP}2380
--listen-peer-urls http://0.0.0.0:2380
--listen-client-urls http://0.0.0.0:2379
--advertise-client-urls http://${NODE2_IP}:2379
--initial-cluster ETCD1=http://${NODE1_IP}:2379,ETCD2=http://${NODE2_IP}:3002
--initial-cluster-state new
Backup
docker run -d -p 2379:2379 -p 2380:2380 -v ${PATH}:/var/lib/etcd seanswlin/etcd
--data-dir /var/lib/etcd
Content type
Image
Digest
Size
12 MB
Last updated
over 9 years ago
docker pull seanswlin/etcd