From 7b4909d98f4953bd22cde7f8abdf7840bbf3ff69 Mon Sep 17 00:00:00 2001 From: Michel Promonet Date: Sat, 27 Apr 2024 17:20:17 +0200 Subject: [PATCH] update base image --- Dockerfile | 18 ++++++++++-------- Dockerfile.arm64 | 22 ++++++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 09e992b..6a6736e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,21 @@ -FROM ubuntu:22.04 as builder +FROM ubuntu:24.04 as builder LABEL maintainer michel.promonet@free.fr WORKDIR /v4l2rtspserver -COPY . /v4l2rtspserver RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates g++ autoconf automake libtool xz-utils cmake make patch pkg-config git wget libasound2-dev libssl-dev \ - && cmake . && make install && apt-get clean && rm -rf /var/lib/apt/lists/ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates g++ autoconf automake libtool xz-utils cmake make patch pkg-config git wget libasound2-dev libssl-dev +COPY . . -FROM ubuntu:22.04 +RUN cmake . && make install && apt-get clean && rm -rf /var/lib/apt/lists/ + +FROM ubuntu:24.04 WORKDIR /usr/local/share/v4l2rtspserver -COPY --from=builder /usr/local/bin/ /usr/local/bin/ -COPY --from=builder /usr/local/share/v4l2rtspserver/ /usr/local/share/v4l2rtspserver/ RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates libasound2 libssl3 && apt-get clean && rm -rf /var/lib/apt/lists/ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates libasound2-dev libssl-dev && apt-get clean && rm -rf /var/lib/apt/lists/ + +COPY --from=builder /usr/local/bin/ /usr/local/bin/ +COPY --from=builder /usr/local/share/v4l2rtspserver/ /usr/local/share/v4l2rtspserver/ ENTRYPOINT [ "/usr/local/bin/v4l2rtspserver" ] CMD [ "-S" ] diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 4ba3acf..bcd1352 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -1,25 +1,27 @@ -FROM ubuntu:22.04 as builder +FROM ubuntu:24.04 as builder LABEL maintainer michel.promonet@free.fr WORKDIR /v4l2rtspserver -COPY . /v4l2rtspserver ARG ARCH=arm64 RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates xz-utils cmake make patch pkg-config git wget gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libasound2-dev \ - && cmake -DCMAKE_SYSTEM_PROCESSOR=${ARCH} -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 . \ - && make install \ - && apt-get clean && rm -rf /var/lib/apt/lists/ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates xz-utils cmake make patch pkg-config git wget gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libasound2-dev && apt-get clean && rm -rf /var/lib/apt/lists/ +COPY . . -FROM arm64v8/ubuntu:22.04 +RUN cmake -DCMAKE_SYSTEM_PROCESSOR=${ARCH} -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 . \ + && make install + + +FROM arm64v8/ubuntu:24.04 WORKDIR /usr/local/share/v4l2rtspserver -COPY --from=builder /usr/local/bin/ /usr/local/bin/ -COPY --from=builder /usr/local/share/v4l2rtspserver/ /usr/local/share/v4l2rtspserver/ RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates libasound2 libssl3 && apt-get clean && rm -rf /var/lib/apt/lists/ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates libasound2-dev libssl-dev && apt-get clean && rm -rf /var/lib/apt/lists/ + +COPY --from=builder /usr/local/bin/ /usr/local/bin/ +COPY --from=builder /usr/local/share/v4l2rtspserver/ /usr/local/share/v4l2rtspserver/ ENTRYPOINT [ "/usr/local/bin/v4l2rtspserver" ] CMD [ "-S" ]