Fix multi-arch Docker package build

This commit is contained in:
ShukeBta
2026-05-28 17:45:33 +08:00
parent 5b3798a283
commit 6afbe44480
2 changed files with 11 additions and 4 deletions
+5
View File
@@ -41,7 +41,12 @@ password.*
.vscode/ .vscode/
.workbuddy/ .workbuddy/
node_modules/ node_modules/
**/node_modules/
web/dist/ web/dist/
**/dist/
web/.vite/
**/.vite/
web/coverage/
bin/ bin/
*.exe *.exe
*.dll *.dll
+6 -4
View File
@@ -33,18 +33,20 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
# ---- Stage 3: runtime ------------------------------------------------------ # ---- Stage 3: runtime ------------------------------------------------------
FROM alpine:3.19 FROM alpine:3.19
# ffmpeg/intel-media-driver/libva enable QSV / VAAPI on Intel iGPUs. # ffmpeg plus optional VAAPI packages. Intel media driver is x86_64-only.
# NVENC requires the proprietary NVIDIA Container Toolkit on the host — # NVENC requires the proprietary NVIDIA Container Toolkit on the host —
# no extra packages needed inside the image, only --gpus all on docker run. # no extra packages needed inside the image, only --gpus all on docker run.
RUN apk add --no-cache \ RUN apk add --no-cache \
ffmpeg \ ffmpeg \
intel-media-driver \
libva-utils \
mesa-va-gallium \
tzdata \ tzdata \
ca-certificates \ ca-certificates \
wget \ wget \
su-exec \ su-exec \
&& if [ "$(apk --print-arch)" = "x86_64" ]; then \
apk add --no-cache intel-media-driver libva-utils mesa-va-gallium; \
else \
apk add --no-cache libva-utils mesa-va-gallium || true; \
fi \
&& rm -rf /var/cache/apk/* && rm -rf /var/cache/apk/*
# Non-root user for the long-running process. # Non-root user for the long-running process.