-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use install target instead of manual install
- Loading branch information
Showing
10 changed files
with
50 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,9 @@ | |
FROM ubuntu:24.04 AS builder | ||
LABEL [email protected] | ||
ARG USERNAME=dev | ||
WORKDIR /webrtc-streamer | ||
COPY . /webrtc-streamer | ||
WORKDIR /build/webrtc-streamer | ||
|
||
COPY . . | ||
|
||
ENV PATH /depot_tools:$PATH | ||
|
||
|
@@ -12,22 +13,22 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins | |
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME \ | ||
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools \ | ||
&& mkdir /webrtc \ | ||
&& cd /webrtc \ | ||
&& mkdir ../webrtc \ | ||
&& 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 webrtc-streamer*.tar.gz \ | ||
&& rm -rf /webrtc/src/out \ | ||
&& cd ../webrtc-streamer \ | ||
&& cmake -DCMAKE_INSTALL_PREFIX=/app . && make \ | ||
&& make install \ | ||
&& rm -rf ../webrtc/src/out \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/ | ||
|
||
# run | ||
FROM ubuntu:24.04 | ||
|
||
WORKDIR /app | ||
WORKDIR /app/webrtc-streamer | ||
|
||
COPY --from=builder /app/ /app/ | ||
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libssl-dev libasound2-dev libgtk-3-0 libxtst6 libpulse0 librtmp1 avahi-utils \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,29 +4,31 @@ ARG IMAGE=arm64v8/ubuntu | |
FROM ubuntu:24.04 AS builder | ||
LABEL [email protected] | ||
|
||
WORKDIR /webrtc-streamer | ||
COPY . /webrtc-streamer | ||
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 \ | ||
&& mkdir /webrtc \ | ||
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools \ | ||
&& export PATH=/depot_tools:$PATH \ | ||
&& cd /webrtc \ | ||
&& 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_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 \ | ||
&& cpack \ | ||
&& mkdir /app && tar xvzf webrtc-streamer*.tar.gz --strip=1 -C /app/ \ | ||
&& rm -rf /webrtc && rm -f *.a && rm -f src/*.o \ | ||
&& 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 $IMAGE | ||
|
||
WORKDIR /app | ||
WORKDIR /app/webrtc-streamer | ||
|
||
COPY --from=builder /app/ /app/ | ||
|
||
ENTRYPOINT [ "./webrtc-streamer" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,31 +7,33 @@ LABEL [email protected] | |
ARG ARCH=armv6l | ||
ARG CROSSCOMPILER=https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%201%2C%20Zero/cross-gcc-10.2.0-pi_0-1.tar.gz | ||
|
||
WORKDIR /webrtc-streamer | ||
COPY . /webrtc-streamer | ||
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 build-essential gcc wget git python3 python3-pkg-resources xz-utils cmake make pkg-config \ | ||
&& mkdir /webrtc \ | ||
&& wget -qO- ${CROSSCOMPILER} | tar xz -C /webrtc \ | ||
&& export PATH=$(ls -d /webrtc/cross-pi-gcc-*/bin):$PATH \ | ||
&& wget -qO- ${CROSSCOMPILER} | tar xz -C /build \ | ||
&& export PATH=$(ls -d /build/cross-pi-gcc-*/bin):$PATH \ | ||
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools \ | ||
&& export PATH=/depot_tools:$PATH \ | ||
&& cd /webrtc \ | ||
&& 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=arm \ | ||
&& gclient sync \ | ||
&& cd /webrtc-streamer \ | ||
&& cmake -DCMAKE_SYSTEM_PROCESSOR=${ARCH} -DCMAKE_LIBRARY_ARCHITECTURE=arm-linux-gnueabihf -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-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 \ | ||
&& cpack \ | ||
&& mkdir /app && tar xvzf webrtc-streamer*.tar.gz --strip=1 -C /app/ \ | ||
&& rm -rf /webrtc && rm -f *.a && rm -f src/*.o \ | ||
&& cd ../webrtc-streamer \ | ||
&& cmake -DCMAKE_INSTALL_PREFIX=/app -DCMAKE_SYSTEM_PROCESSOR=${ARCH} -DCMAKE_LIBRARY_ARCHITECTURE=arm-linux-gnueabihf -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-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 $IMAGE | ||
|
||
WORKDIR /app | ||
WORKDIR /app/webrtc-streamer | ||
|
||
COPY --from=builder /app/ /app/ | ||
|
||
ENTRYPOINT [ "./webrtc-streamer" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters