通过docker部署单节点consul,方便搭建测试环境、学习环境
version: '2'
services:
consul1:
image: consul
container_name: consul
ports:
- "8500:8500"
volumes:
- ./data:/consul/data
command: agent -server -bootstrap-expect=1 -node=node1 -bind=0.0.0.0 -client=0.0.0.0 -datacenter=dc1 -ui
访问: