【发布时间】:2020-10-27 19:43:35
【问题描述】:
我是第一次深入研究 Docker 容器的世界。 我的主机环境是 VM 上的 Windows 10 Enterprise。 我能够启动 docker 并使用 Linux 容器模式。 Docker 引擎:v19.03.8
从 Evenstore 容器开始 -
[https://github.com/EventStore/eventstore-docker][1]
我已经创建了一个撰写文件
version: '3.8'
services:
eventstore:
container_name: productservice-eventstore
image: eventstore/eventstore
ports:
- 2113:2113
- 1113:1113
environment:
- EVENTSTORE_EXT_HTTP_PORT=2113
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_DEV=true
我正在开发中运行 Eventstore 以避免 TLS 要求
容器启动并显示为在 docker 仪表板中运行,但我无法使用访问 UI
http://localhost:2113/
enter code here
This site can’t be reachedlocalhost refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
从文档中我了解到 -P 2113:2113 会进行端口转发。 我什至将外部端口更改为 8085,但仍然无法使用。
我需要帮助从主机 VM 访问 Eventstore ui。
问题 2) 我们可以通过compose文件(环境变量)为EventStore容器分配一个外部IP地址,可以直接在主机中使用而不是映射。
如果您需要日志中的信息,请告诉我
****** 编辑 1*****
在我的回答中完成了撰写文件的更改后,我能够让 UI 在 Edge 中工作,但出现一些错误
A) 微软边缘
B) 铬
来自 Power Shell:
productservice-eventstore | ========================================================================================================
productservice-eventstore | DEVELOPMENT MODE IS ON. THIS MODE IS *NOT* INTENDED FOR PRODUCTION USE.
productservice-eventstore | WHEN IN DEVELOPMENT MODE EVENT STORE WILL
productservice-eventstore | - NOT WRITE ANY DATA TO DISK.
productservice-eventstore | - USE A SELF SIGNED CERTIFICATE.
productservice-eventstore | ========================================================================================================
productservice-eventstore |
productservice-eventstore | [ 1, 1,13:43:36.155,INF]
productservice-eventstore | INTERFACES
productservice-eventstore | External TCP (Protobuf)
productservice-eventstore | Enabled : True
productservice-eventstore | Port : 1113
productservice-eventstore | HTTP (AtomPub)
productservice-eventstore | Enabled : True
productservice-eventstore | Port : 2113
尝试使用 edge 或 chrome 从主机访问时
productservice-eventstore | [ 1,33,14:12:31.955,ERR] Client certificate validation error: "The certificate provided by the client failed validation with the following error(s): RemoteCertificateChainErrors (PartialChain)
**问题 3 **
可以下载自签名证书并添加到客户端信任模式吗?
【问题讨论】:
标签: docker-compose portforwarding eventstoredb