Last active
April 14, 2018 09:15
-
-
Save mganeko/96e310d40708528b805b49a9f143742d to your computer and use it in GitHub Desktop.
aiortc_on_docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ubuntu 16.04 and aiortc | |
FROM ubuntu:16.04 | |
MAINTAINER mganeko | |
#ENV http_proxy "http://proxy.yourdomain.com:8080/" | |
#ENV https_proxy "http://proxy.yourdomain.com:8080/" | |
# -- build step -- | |
RUN apt update | |
RUN apt upgrade -y | |
# RUN apt install apt-utils -y # not necessary | |
RUN apt install python3 -y | |
RUN apt install python3-pip -y | |
RUN apt install python3-dev -y | |
RUN python3 -V | |
RUN pip3 -V | |
RUN pip3 install --upgrade pip | |
RUN pip -V | |
RUN apt install libopus-dev -y | |
RUN apt install libvpx-dev -y | |
RUN apt install libffi-dev -y | |
RUN apt install libssl-dev -y | |
RUN apt install git -y | |
#RUN mkdir /root/work \ | |
# && cd /root/work \ | |
# && git clone https://github.com/jlaine/aiortc.git \ | |
# && cd aiortc | |
RUN mkdir /root/work | |
WORKDIR /root/work/ | |
RUN git clone https://github.com/jlaine/aiortc.git | |
RUN pip install aiohttp | |
RUN pip install aiortc | |
# --- for running -- | |
EXPOSE 8080 | |
WORKDIR /root/work/aiortc/examples/server/ | |
CMD [ "python3", "server.py" ] | |
# ----------- | |
# -- memo --- | |
# ----------- | |
# ---- to build --- | |
# docker build -t mganeko/ubuntu_aiortc -f Dockerfile . | |
# docker build --no-cache=true -t mganeko/ubuntu_aiortc -f Dockerfile . | |
# --- connect with bash-- | |
# docker run -it mganeko/ubuntu_aiortc bash | |
# --- run aiortc sample -- | |
# docker run -d -p 8001:8080 mganeko/ubuntu_aiortc | |
# -- then connect with chrome to http://localhost:8001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ビルドするには
docker build -t mganeko/ubuntu_aiortc -f Dockerfile .
実行するには
docker run -d -p 8001:8080 mganeko/ubuntu_aiortc
その後 Chromeで http://localhost:8001 に接続(Firefoxでは、映像が出ない?)