diff --git a/Dockerfile b/Dockerfile index fddaf7da..847e4461 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,15 +13,15 @@ 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 /build/webrtc-streamer \ + && cd ../webrtc-streamer \ && cmake -DCMAKE_INSTALL_PREFIX=/app . && make \ && make install \ - && rm -rf /webrtc/src/out \ + && rm -rf ../webrtc/src/out \ && apt-get clean && rm -rf /var/lib/apt/lists/ # run diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index a59dddd5..ce643e54 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -8,19 +8,20 @@ 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 /build/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 \ + && 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 \ + && rm -rf ../webrtc && rm -f *.a && rm -f src/*.o \ && apt-get clean && rm -rf /var/lib/apt/lists/ # run diff --git a/Dockerfile.rpi b/Dockerfile.rpi index 88f8a218..bbe63da5 100644 --- a/Dockerfile.rpi +++ b/Dockerfile.rpi @@ -11,21 +11,22 @@ 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 \ && 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 /build/webrtc-streamer \ + && 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 \ + && rm -rf ../webrtc && rm -f *.a && rm -f src/*.o \ && apt-get clean && rm -rf /var/lib/apt/lists/ # run