docker host ip addr 192.168.5.170

docker run \
  -p 2379:2379 \
  -p 2380:2380 \
  --volume=/dir/for/etcd/data:/etcd-data \
  --name etcd --rm -d quay.io/coreos/etcd:latest \
  /usr/local/bin/etcd \
  --data-dir=/etcd-data --name node1 \
  --initial-advertise-peer-urls http://192.168.5.170:2380 \
  --listen-peer-urls http://0.0.0.0:2380 \
  --advertise-client-urls http://192.168.5.170:2379 \
  --listen-client-urls http://0.0.0.0:2379 \
  --initial-cluster node1=http://192.168.5.170:2380

check

docker exec -it etcd etcdctl member list

test with golang