Commit e0308e48 authored by 簡碩辰's avatar 簡碩辰

Update Dockerfile

parent 9a2434d6
FROM raspbian/jessie
# 更新系統套件清單
RUN apt-get update
RUN apt-get install -y git make build-essential pkg-config python3-dev python3-pip
RUN rm -r /var/lib/apt/lists/*
RUN pip3 install --upgrade pip
RUN pip3 install pexpect
# 安裝編譯用套件
RUN apt-get install -y git pkg-config build-essential make
# 下載 h264 套件
RUN git clone git://git.videolan.org/x264 /usr/src/x264
WORKDIR /usr/src/x264
RUN ./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl
# 設定 h264 編譯參數
RUN /usr/src/x264/configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl
# 編譯 h264
RUN make
# 安裝 h264
RUN make install
# 下載 ffmpeg 套件
RUN git clone git://source.ffmpeg.org/ffmpeg.git /usr/src/ffmpeg
WORKDIR /usr/src/ffmpeg
RUN ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree
# 設定 ffmpeg 編譯參數
RUN /usr/src/ffmpeg/configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree
# 編譯 ffmpeg
RUN make
# 安裝 ffmpeg
RUN make install
# 安裝 python3 套件
RUN apt-get install -y python3-dev python3-pip
# 更新 python3 套件
RUN pip3 install --upgrade pip
# 安裝 mqtt 套件
RUN pip3 install paho-mqtt
ENV TZ=Asia/Taipei
# 移除系統套件清單
RUN rm -r /var/lib/apt/lists/*
# 複製拋轉程式
COPY run.py run.py
# 執行拋轉程式
CMD python3 run.py
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment