-
Notifications
You must be signed in to change notification settings - Fork 603
/
Dockerfile.arm64
34 lines (26 loc) · 1.48 KB
/
Dockerfile.arm64
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 ubuntu:24.04 AS builder
LABEL [email protected]
WORKDIR /build/webrtc-streamer
COPY . .
ENV PATH /depot_tools:$PATH
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates wget git python3 python3-pkg-resources xz-utils cmake make pkg-config gcc-aarch64-linux-gnu g++-aarch64-linux-gnu build-essential \
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools \
&& mkdir ../webrtc \
&& cd ../webrtc \
&& fetch --no-history --nohooks webrtc \
&& sed -i -e "s|'src/resources'],|'src/resources'],'condition':'rtc_include_tests==true',|" src/DEPS \
&& src/build/linux/sysroot_scripts/install-sysroot.py --arch=arm64 \
&& gclient sync \
&& cd ../webrtc-streamer \
&& cmake -DCMAKE_INSTALL_PREFIX=/app -DCMAKE_SYSTEM_PROCESSOR=arm64 -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DWEBRTCDESKTOPCAPTURE=OFF . && make \
&& make install \
&& rm -rf ../webrtc && rm -f *.a && rm -f src/*.o \
&& apt-get clean && rm -rf /var/lib/apt/lists/
# run
FROM --platform=arm64 ubuntu:24.04
LABEL [email protected]
WORKDIR /app/webrtc-streamer
COPY --from=builder /app/ /app/
ENTRYPOINT [ "./webrtc-streamer" ]
CMD [ "-a", "-C", "config.json" ]