Skip to content

Instantly share code, notes, and snippets.

@mganeko
Last active April 14, 2018 09:15
Show Gist options
  • Save mganeko/96e310d40708528b805b49a9f143742d to your computer and use it in GitHub Desktop.
Save mganeko/96e310d40708528b805b49a9f143742d to your computer and use it in GitHub Desktop.
aiortc_on_docker
# 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
@mganeko
Copy link
Author

mganeko commented Apr 11, 2018

ビルドするには
docker build -t mganeko/ubuntu_aiortc -f Dockerfile .

実行するには
docker run -d -p 8001:8080 mganeko/ubuntu_aiortc

その後 Chromeで http://localhost:8001 に接続(Firefoxでは、映像が出ない?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment