Skip to content

Commit

Permalink
change install destination
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Jan 25, 2025
1 parent 93330a2 commit d79ee28
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@ if (NOT APPLE)
endif()

#cpack
install (TARGETS ${CMAKE_PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_PROJECT_NAME})
install (DIRECTORY html DESTINATION ${CMAKE_PROJECT_NAME})
install (FILES config.json DESTINATION ${CMAKE_PROJECT_NAME})
install (TARGETS ${CMAKE_PROJECT_NAME} RUNTIME DESTINATION bin)
install (DIRECTORY html DESTINATION share/${PROJECT_NAME})
install (FILES config.json DESTINATION share/${PROJECT_NAME})
SET(CPACK_GENERATOR "TGZ")
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}-${CMAKE_BUILD_TYPE})
SET(CPACK_PACKAGE_CONTACT "[email protected]")
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
&& cd ../webrtc \
&& fetch --nohooks webrtc \
&& cd ../webrtc-streamer \
&& cmake -DCMAKE_INSTALL_PREFIX=/app . && make \
&& cmake . && make \
&& make install \
&& git clean -xfd \
&& find ../webrtc/src -type d -name .git -exec rm -rf {} \; || true \
Expand All @@ -32,16 +32,17 @@ USER $USERNAME
FROM ubuntu:24.04
LABEL [email protected]

WORKDIR /app/webrtc-streamer
WORKDIR /usr/local/share/webrtc-streamer

COPY --from=builder /app/ /app/
COPY --from=builder /usr/local/bin/webrtc-streamer /usr/local/bin/
COPY --from=builder /usr/local/share/webrtc-streamer/ /usr/local/share/webrtc-streamer/

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libssl-dev libasound2-dev libgtk-3-0 libxtst6 libsm6 libpulse0 librtmp1 avahi-utils \
&& useradd -m user -G video,audio \
&& apt-get clean && rm -rf /var/lib/apt/lists/ \
&& ./webrtc-streamer -V
&& webrtc-streamer -V

USER user

ENTRYPOINT [ "./webrtc-streamer" ]
ENTRYPOINT [ "webrtc-streamer" ]
CMD [ "-C", "config.json" ]
9 changes: 5 additions & 4 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
&& cd ../webrtc \
&& fetch --nohooks webrtc \
&& 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 \
&& 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 \
&& make install \
&& rm -rf ../webrtc && rm -f *.a && rm -f src/*.o \
&& apt-get clean && rm -rf /var/lib/apt/lists/
Expand All @@ -23,9 +23,10 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
FROM --platform=arm64 ubuntu:24.04
LABEL [email protected]

WORKDIR /app/webrtc-streamer
WORKDIR /usr/local/share/webrtc-streamer

COPY --from=builder /app/ /app/
COPY --from=builder /usr/local/bin/webrtc-streamer /usr/local/bin/
COPY --from=builder /usr/local/share/webrtc-streamer/ /usr/local/share/webrtc-streamer/

ENTRYPOINT [ "./webrtc-streamer" ]
ENTRYPOINT [ "webrtc-streamer" ]
CMD [ "-a", "-C", "config.json" ]
9 changes: 5 additions & 4 deletions Dockerfile.rpi
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
&& cd ../webrtc \
&& fetch --nohooks webrtc \
&& 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 \
&& 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 \
&& make install \
&& rm -rf ../webrtc && rm -f *.a && rm -f src/*.o \
&& apt-get clean && rm -rf /var/lib/apt/lists/
Expand All @@ -30,9 +30,10 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
FROM $IMAGE
LABEL [email protected]

WORKDIR /app/webrtc-streamer
WORKDIR /usr/local/share/webrtc-streamer

COPY --from=builder /app/ /app/
COPY --from=builder /usr/local/bin/webrtc-streamer /usr/local/bin/
COPY --from=builder /usr/local/share/webrtc-streamer/ /usr/local/share/webrtc-streamer/

ENTRYPOINT [ "./webrtc-streamer" ]
ENTRYPOINT [ "webrtc-streamer" ]
CMD [ "-a", "-C", "config.json" ]
6 changes: 3 additions & 3 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ RUN powershell -c "sleep -Seconds 60" && time /t
FROM mcr.microsoft.com/windows/server:ltsc2022
LABEL [email protected]

WORKDIR /app/webrtc-streamer
WORKDIR /app/share/webrtc-streamer

COPY --from=builder /app/ /app/

RUN dir /w && set
RUN webrtc-streamer.exe -V
RUN /app/bin/webrtc-streamer.exe -V

ENTRYPOINT [ "webrtc-streamer.exe" ]
ENTRYPOINT [ "/app/bin/webrtc-streamer.exe" ]
CMD [ "-a", "-C", "config.json" ]

0 comments on commit d79ee28

Please sign in to comment.