Skip to content

Instantly share code, notes, and snippets.

@sandalsoft
Created July 31, 2019 14:36
Show Gist options
  • Select an option

  • Save sandalsoft/8a925c7994f7c5963d795786da53f6e4 to your computer and use it in GitHub Desktop.

Select an option

Save sandalsoft/8a925c7994f7c5963d795786da53f6e4 to your computer and use it in GitHub Desktop.
#!/bin/bash
CONTAINER_NAME=`pwd | xargs basename`
DATA_FOLDER='data'
CONTAINER_DATA_PATH=$CONTAINER_HOME/$CONTAINER_NAME/$DATA_FOLDER
#HostIp=10.0.10.118
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:v2.3.8 \
-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