如何在Docker容器中运行kurento,在主机上使用kurento hello world示例

我克隆了kurento docker,这样我就可以在容器中使用kurento服务器了。 我正在使用kurento-hello-world javascript版本。

我使用以下设置

"net": { "websocket": { "port": "8888", "secure": { "port": "8080", "certificate": "defaultCertificate.pem", "password": "" }, "path": "kurento", "threads": "10" } } 

我也为kurentoconfiguration了stun服务器

 "WebRtcEndpoint": { "stunServerAddress": "<173.194.66.127>", "stunServerPort": "<19302>", "configPath": "\/etc\/kurento\/modules\/kurento" }, 

在构buildDocker镜像时,我在与configuration相同的文件夹中创build名为defaultCertificate.pem的自签名证书。 当我读到kurento服务器需要连接到安全。 我在Docker容器中公开端口8080。

然后,我在端口8443上运行的主机上启动kurento-hello-world示例。我按以下方式访问url

HTTPS://本地主机:8443 / index.html中ws_uri = WSS://本地主机:8080 / kurento

hello world示例提供了一个sdp offer。 问题是hello world的例子然后输出。

 WebSocket connection to 'wss://localhost:8080/kurento' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED 

这意味着什么都没有在远程stream中显示。 而当我看着kurento服务器日志,甚至没有什么logging。

简而言之,我如何得到你好世界的例子来与在docker中运行的我的kurento服务器进行通信。

编辑:我搬入克隆的存储库的docker文件夹,我运行docker像这样:

 docker build -t kurento . docker run -t kurento 

我不添加-p 8080:8080,因为我在docker文件中公开端口。 虽然我也尝试过这种方式。

哎呀…不是最明显的错误,只是必须改变

““`stunServerAddress“:”<173.194.66.127>“,

“““stunServerPort“:”<19302>“,

““`stunServerAddress“:”173.194.66.127“,

“““stunServerPort“:”19302“,

正在寻找错误的地方。