Docker run

docker run -d --net=host --name consul -v /docker_data/consul/data:/consul/data -v /docker_data/consul/config:/consul/config  consul:1.5.2 consul agent -config-dir=/consul/config

-bootstrap   > only one run 

-retry-join=0.0.0.0 -bootstrap-expect=2   > join cluster(many nodes)
-retry-join=0.0.0.0> join cluster(2 nodes)

config file

config.json
{
  "datacenter": "MyCenter",
  "log_level": "INFO",
  "bind_addr": "xxx.xxx.xxx.xxx",
  "client_addr": "xxx.xxx.xxx.xxx",
  "data_dir": "/consul/data",
  "node_name": "MyHostname",
  "server": true,
  "performance":{
    "raft_multiplier": 1
  },
  "ui": true
}