forked from mpromonet/webrtc-streamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (27 loc) · 1.14 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# build
FROM heroku/heroku:18 as builder
LABEL [email protected]
WORKDIR /webrtc-streamer
COPY . /webrtc-streamer
RUN apt-get update && apt-get install -y --no-install-recommends g++ autoconf automake libtool xz-utils libasound2-dev libgtk-3-dev cmake p7zip-full \
&& git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /webrtc/depot_tools \
&& export PATH=/webrtc/depot_tools:$PATH \
&& cd /webrtc \
&& fetch --no-history --nohooks webrtc \
&& sed -i -e "s|'src/resources'],|'src/resources'],'condition':'rtc_include_tests==true',|" src/DEPS \
&& gclient sync \
&& cd /webrtc-streamer \
&& cmake . && make \
&& cpack \
&& mkdir /app && tar xvzf webrtc-streamer*.tar.gz --strip=1 -C /app/ \
&& rm -rf /webrtc && rm -f *.a && rm -f src/*.o \
&& apt-get clean && rm -rf /var/lib/apt/lists/
# run
FROM ubuntu:18.04
WORKDIR /app
COPY --from=builder /app/ /app/
RUN apt-get update && apt-get install -y --no-install-recommends libasound2 libgtk-3-0 \
&& apt-get clean && rm -rf /var/lib/apt/lists/
EXPOSE 8000
ENTRYPOINT [ "./webrtc-streamer" ]
CMD [ "-a", "-C", "config.json", "screen://" ]