sudo docker run -d --restart=always \--privileged=true \--name etcd \-p 2379:2379 \-p 2380:2380 \--env ALLOW_NONE_AUTHENTICATION=yes \--env ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379 \--log-opt max-size=10m \--log-opt max-file=1 \bitnami/etcd:3.4.15
# 不好使
sudo docker run \
-p 2379:2379 \
-p 2380:2380 \
--mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
--name etcd-gcr-v3.3.0-rc.2 \
gcr.io/etcd-development/etcd:v3.3.0-rc.2 \
/usr/loacl/bin/etcd \
--name s1 \
--data-dir /etcd-data \
--listen-client-urls http://0.0.0.0:2379 \
--advertise-client-urls http://0.0.0.0:2379 \
--listen-peer-utls http://0.0.0.0:2380 \
--initial-advertise-peer-urls http://0.0.0.0:2380 \
--initial-cluster s1=http://0.0.0.0:2380 \
--initial-cluster-token tkn \
--initial-cluster-state new
参考http://www.etcd.cn/docs/current/dl-build/