mkdir -p /consul/data
2)执行docker命令:
docker run -d -p 8500:8500 \ --restart=always \ --name=consul \ -v "/consul/data:/consul/data" \ consul agent \ -server \ -ui \ -client=0.0.0.0 \ -bootstrap-expect=1