使用docker-compose进行安装
version: "3.1"
services:
consul:
image: consul
restart: always
container_name: consul
ports:
- 8500:8500
- 8300:8300
- 8301:8301
- 8302:8302
- 8600:8600/udp
volumes:
- ./data:/consul/data
- ./data:/consul/config
command: agent -dev -client=0.0.0.0