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.

Revisions

  1. mganeko revised this gist Apr 14, 2018. 1 changed file with 14 additions and 10 deletions.
    24 changes: 14 additions & 10 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ MAINTAINER mganeko
    # -- build step --
    RUN apt update
    RUN apt upgrade -y
    RUN apt install apt-utils -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
    @@ -26,10 +26,14 @@ 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 \
    # && 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
    @@ -46,15 +50,15 @@ CMD [ "python3", "server.py" ]
    # -----------

    # ---- to build ---
    # docker build -t mganeko/ubuntu_ptyhon -f Dockerfile .
    # docker build -t mganeko/ubuntu_aiortc -f Dockerfile .

    # docker build --no-cache=true -t mganeko/ubuntu_ptyhon -f Dockerfile .
    # docker build --no-cache=true -t mganeko/ubuntu_aiortc -f Dockerfile .


    # --- connect with bash--
    # docker run -it mganeko/ubuntu_ptyhon bash
    # docker run -it mganeko/ubuntu_aiortc bash

    # --- run aiortc sample --
    # docker run -d -p 8001:8080 mganeko/ubuntu_ptyhon
    # docker run -d -p 8001:8080 mganeko/ubuntu_aiortc

    # -- then connect with chrome to localhost:8001
    # -- then connect with chrome to http://localhost:8001
  2. mganeko created this gist Apr 11, 2018.
    60 changes: 60 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,60 @@
    # 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
    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 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_ptyhon -f Dockerfile .

    # docker build --no-cache=true -t mganeko/ubuntu_ptyhon -f Dockerfile .


    # --- connect with bash--
    # docker run -it mganeko/ubuntu_ptyhon bash

    # --- run aiortc sample --
    # docker run -d -p 8001:8080 mganeko/ubuntu_ptyhon

    # -- then connect with chrome to localhost:8001