Skip to content

Commit

Permalink
update base image
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Apr 27, 2024
1 parent 21796e1 commit 7b4909d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
18 changes: 10 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
FROM ubuntu:22.04 as builder
FROM ubuntu:24.04 as builder
LABEL maintainer [email protected]
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" ]
22 changes: 12 additions & 10 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
FROM ubuntu:22.04 as builder
FROM ubuntu:24.04 as builder
LABEL maintainer [email protected]
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" ]

0 comments on commit 7b4909d

Please sign in to comment.