Add CDN dependency download script and update Dockerfiles for offline web UI

This commit is contained in:
Sergey Krashevich
2026-02-16 04:50:24 +03:00
parent 01c7451556
commit 73c43dbf8b
5 changed files with 153 additions and 10 deletions
+12 -4
View File
@@ -24,7 +24,15 @@ COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath
# 2. Final image
# 2. Download CDN dependencies for offline web UI
FROM alpine AS download-cdn
RUN apk add --no-cache wget
COPY www/ /web/
COPY docker/download_cdn.sh /tmp/
RUN sh /tmp/download_cdn.sh /web
# 3. Final image
FROM python:${PYTHON_VERSION}
# Prepare apt for buildkit cache
@@ -42,10 +50,10 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked --mount=type=cache,t
COPY --from=build /build/go2rtc /usr/local/bin/
ADD --chmod=755 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-8-no_extra_dump/ffmpeg /usr/local/bin
COPY --from=download-cdn /web /var/www/go2rtc
COPY --chmod=755 docker/entrypoint.sh /usr/local/bin/
EXPOSE 1984 8554 8555 8555/udp
ENTRYPOINT ["/usr/bin/tini", "--"]
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/entrypoint.sh"]
VOLUME /config
WORKDIR /config
CMD ["go2rtc", "-config", "/config/go2rtc.yaml"]