尝试在 Docker Swarm 集群上运行 Couchbase 集群。集群启动后,我想动态获取每个Couchbase实例的IP地址。docker inspect显示:"NetworkSettings": { "Bridge": "", "SandboxID": "325807d55b552be3fe5b44b4d975c2486b3a56b320aa56fa0367e42348b82d64", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": { "11207/tcp": null, "11210/tcp": [ { "HostIp": "192.168.99.101", "HostPort": "11210" } ],尝试访问 IP 地址会出现错误:docker inspect --format '{{ .NetworkSettings.Ports.8091/tcp[0].HostIp }}' 922755302fefTemplate parsing error: template: :1: unexpected ".8091" in operand; missing space?访问 IP 地址的正确格式是什么?
- 1 回答
- 0 关注
- 176 浏览
添加回答
举报
0/150
提交
取消