2017-10-13 799 views

回答

1

如果检查泊坞窗,撰写-couch.yaml你会发现,端口已被映射到主机:

couchdb1: 
    container_name: couchdb1 
    image: hyperledger/fabric-couchdb 
    # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service, 
    # for example map it to utilize Fauxton User Interface in dev environments. 
    ports: 
     - "6984:5984" 

在这种情况下,撰写文件映射5984为默认端口的CouchDB 6984在主机上。如果您想检查本示例中启动的容器中运行的CouchDB,请在浏览器中打开http://localhost:6984/_utils/

+0

非常感谢。我发现docker-compose-couch.yaml中的ports映射就像你说的那样。 但我仍然无法连接,当我打开http:// localhost:6984/_utils /在我的浏览器中。然后,我发现我需要在VirtualBox上设置linux VM和Windows之间的映射。设置映射后,http:// localhost:6984/_utils /是可行的。:) – Tiffany999

+0

啊;-)是的,它在Mac上无缝工作,当我验证。 – christo4ferris

1

要设置VirtualBox上的端口映射,以下步骤供参考。

  1. 启动VirtualBox管理器。
  2. 选择名为“default”的正在运行的VM。点击“设置”。选择“网络”。
  3. 打开“高级”部分并点击“端口转发”。
  4. 单击“添加新的端口转发规则”按钮。然后将主机端口设置为6984,将访客端口设置为5984,作为the screenshot
相关问题