mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-03-15 07:26:44 +08:00
回滚docker构建脚本
This commit is contained in:
@@ -1,37 +1,38 @@
|
|||||||
# One-KVM Runtime Image
|
# One-KVM Runtime Image
|
||||||
# This Dockerfile only packages pre-compiled binaries (no compilation)
|
# This Dockerfile only packages pre-compiled binaries (no compilation)
|
||||||
# Used after cross-compiling with `cross build`
|
# Used after cross-compiling with `cross build`
|
||||||
# Using Arch Linux base to match rolling glibc on build hosts.
|
# Using Debian 11 for maximum compatibility (GLIBC 2.31)
|
||||||
|
|
||||||
ARG TARGETPLATFORM=linux/amd64
|
ARG TARGETPLATFORM=linux/amd64
|
||||||
|
|
||||||
FROM lsiobase/arch
|
FROM debian:11-slim
|
||||||
|
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
# Install runtime dependencies in a single layer
|
# Install runtime dependencies in a single layer
|
||||||
# All codec libraries (libx264, libx265, libopus) are now statically linked
|
# All codec libraries (libx264, libx265, libopus) are now statically linked
|
||||||
# Only hardware acceleration drivers and core system libraries remain dynamic
|
# Only hardware acceleration drivers and core system libraries remain dynamic
|
||||||
RUN pacman -Syu --noconfirm --needed \
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
# Core runtime (all platforms) - no codec libs needed
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
systemd-libs \
|
libudev1 \
|
||||||
alsa-lib \
|
libasound2 \
|
||||||
libv4l \
|
# v4l2 is handled by kernel, minimal userspace needed
|
||||||
libyuv \
|
libv4l-0 \
|
||||||
ffmpeg \
|
|
||||||
&& \
|
&& \
|
||||||
# Platform-specific hardware acceleration
|
# Platform-specific hardware acceleration
|
||||||
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
pacman -S --noconfirm --needed \
|
apt-get install -y --no-install-recommends \
|
||||||
libva libx11 libxcb libxau libxdmcp libmfx; \
|
libva2 libva-drm2 libva-x11-2 libx11-6 libxcb1 libxau6 libxdmcp6 libmfx1; \
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
pacman -S --noconfirm --needed \
|
apt-get install -y --no-install-recommends \
|
||||||
libdrm libva; \
|
libdrm2 libva2; \
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
pacman -S --noconfirm --needed \
|
apt-get install -y --no-install-recommends \
|
||||||
libdrm libva; \
|
libdrm2 libva2; \
|
||||||
fi && \
|
fi && \
|
||||||
pacman -Scc --noconfirm && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
mkdir -p /etc/one-kvm/ventoy
|
mkdir -p /etc/one-kvm/ventoy
|
||||||
|
|
||||||
# Copy init script
|
# Copy init script
|
||||||
|
|||||||
Reference in New Issue
Block a user