【问题标题】:How to access kurento media server running inside docker container如何访问在 docker 容器内运行的 kurento 媒体服务器
【发布时间】:2017-01-04 19:56:44
【问题描述】:

我需要在 docker 容器内配置 kurento 媒体服务器。

我可以在我的 Ubuntu 机器上配置 kurento 媒体服务器,并且可以根据需要执行教程。

链接如下:

Kurento 媒体服务器安装:

http://doc-kurento.readthedocs.io/en/stable/installation_guide.html

Kurento 一对一通话教程:

http://doc-kurento.readthedocs.io/en/stable/tutorials/node/tutorial-one2one.html

现在我需要在 docker 容器中进行同样的设置。

我已经创建了一个自定义的 Docker 镜像(参考链接:https://docs.docker.com/engine/tutorials/dockerimages/

使用之前的过程,我已经创建了 dockerfile

Dockerfile 内容:

FROM ubuntu:14.04
MAINTAINER USER1 "USER1@infinte.com"
RUN apt-get update
RUN apt-get install wget -y
RUN apt-get install git -y
RUN apt-get install curl -y
RUN echo "deb http://ubuntu.kurento.org trusty kms6" | sudo tee /etc/apt/sources.list.d/kurento.list
RUN wget -O - http://ubuntu.kurento.org/kurento.gpg.key | sudo apt-key add -
RUN apt-get update -y
RUN apt-get install kurento-media-server-6.0 -y
RUN sudo service kurento-media-server-6.0 start
RUN sudo service kurento-media-server-6.0 stop
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
RUN sudo apt-get install -y nodejs -y
RUN sudo npm install -g bower -y
RUN git clone https://github.com/Kurento/kurento-tutorial-node.git
RUN cd kurento-tutorial-node/kurento-one2one-call && pwd
RUN cd kurento-tutorial-node/kurento-one2one-call && git checkout 6.5.0
RUN sudo service kurento-media-server-6.0 start
RUN cd kurento-tutorial-node/kurento-one2one-call && npm install
EXPOSE 8080

我可以在容器内构建 docker 镜像并执行 kurento 教程。

证明如下:

root@6be9dd5da412:/kurento-tutorial-node/kurento-one2one-call# npm start

> kurento-one2one-call@6.5.0 start /kurento-tutorial-node/kurento-one2one-call
> node server.js

Kurento Tutorial started
Open https://localhost:8443/ with a WebRTC capable browser

但现在我仍然无法使用链接访问相同的内容。

我想我遗漏了一些关于端口转发或任何东西的东西。

有人帮我做同样的事情。

【问题讨论】:

    标签: node.js docker dockerfile kurento


    【解决方案1】:

    我能找到解决办法。

    问题在于端口暴露。

    服务在 8443 端口启动,但我试图暴露 8080 端口。

    所以更改与 EXPOSE 8443 相同。

    然后 in 工作正常。

    运行容器的命令:

    docker run -t -i -p 8443:8443 ouruser/webrtc /bin/bash
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-07-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多