Created
July 31, 2019 14:36
-
-
Save sandalsoft/8a925c7994f7c5963d795786da53f6e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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