Refactor Dockerfile to use scratch as base image and add go2rtc binary using ADD command (#7321)

This commit is contained in:
Sergey Krashevich 2023-07-29 05:33:21 +03:00 committed by GitHub
parent b42e995f0f
commit eaf7078d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,11 +30,10 @@ RUN --mount=type=tmpfs,target=/tmp --mount=type=tmpfs,target=/var/cache/apt \
--mount=type=cache,target=/root/.ccache \ --mount=type=cache,target=/root/.ccache \
/deps/build_nginx.sh /deps/build_nginx.sh
FROM wget AS go2rtc FROM scratch AS go2rtc
ARG TARGETARCH ARG TARGETARCH
WORKDIR /rootfs/usr/local/go2rtc/bin WORKDIR /rootfs/usr/local/go2rtc/bin
RUN wget -qO go2rtc "https://github.com/AlexxIT/go2rtc/releases/download/v1.6.2/go2rtc_linux_${TARGETARCH}" \ ADD --link --chmod=755 "https://github.com/AlexxIT/go2rtc/releases/download/v1.6.2/go2rtc_linux_${TARGETARCH}" go2rtc
&& chmod +x go2rtc
#### ####