我正在尝试通过以下步骤运行官方的Docker镜像:
docker pull consul
docker run -d --name=dev-consul -p 8500:8500 consul
当我尝试使用curl访问consul服务器时,收到了一个空回复。
vagrant@docker:~$ curl localhost:8500/v1/catalog/nodes --verbose
* Hostname was NOT found in DNS cache
* Trying ::1...
* Connected to localhost (::1) port 8500 (#0)
> GET /v1/catalog/nodes HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:8500
> Accept: */*
>
* Empty reply from server
* Connection #0 to host localhost left intact
curl: (52) Empty reply from server
我错过了什么?
docker logs dev-consul
- Slawomir Jaranowski