Skip to content

Instantly share code, notes, and snippets.

@warrenca
Created May 25, 2017 01:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warrenca/4b907711470d11bb5eaacb18beab0d22 to your computer and use it in GitHub Desktop.
Save warrenca/4b907711470d11bb5eaacb18beab0d22 to your computer and use it in GitHub Desktop.
docker-etcd.sh
#!/bin/bash
docker stop etcd; docker rm etcd; docker run -d -p 4001:4001 -p 2380:2380 -p 2379:2379 \
--name etcd quay.io/coreos/etcd /usr/local/bin/etcd \
-name etcd0 \
-advertise-client-urls http://${HostIP}:2379,http://${HostIP}:4001 \
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
-initial-advertise-peer-urls http://${HostIP}:2380 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster-1 \
-initial-cluster etcd0=http://${HostIP}:2380 \
-initial-cluster-state new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment