For the full documentation, please check https://coreos.com/etcd/docs/latest/docker_guide.html.
A simple script to start 1-node etcd (assuming ETCD_HOST variable is defined) is:
ETCD_HOST=${ETCD_HOST:-10.20.2.4:2379}
docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379
--name etcd quay.io/coreos/etcd
-name etcd0
-advertise-client-urls http://${ETCD_HOST}:2379,http://${ETCD_HOST}:4001
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001
-initial-advertise-peer-urls http://${ETCD_HOST}:2380
-listen-peer-urls http://0.0.0.0:2380
-initial-cluster-token etcd-cluster-1
-initial-cluster etcd0=http://${ETCD_HOST}:2380
-initial-cluster-state new
Content type
Image
Digest
Size
13.3 MB
Last updated
about 7 years ago
docker pull flyceek/etcd