Files
One-KVM/build/Dockerfile.runtime

48 lines
1.4 KiB
Docker

# One-KVM Runtime Image
# This Dockerfile only packages pre-compiled binaries (no compilation)
# Used after cross-compiling with `cross build`
# Using Arch Linux base to match rolling glibc on build hosts.
ARG TARGETPLATFORM=linux/amd64
FROM lsiobase/arch
ARG TARGETPLATFORM
# Install runtime dependencies in a single layer
# All codec libraries (libx264, libx265, libopus) are now statically linked
# Only hardware acceleration drivers and core system libraries remain dynamic
RUN pacman -Syu --noconfirm --needed \
ca-certificates \
systemd-libs \
alsa-lib \
libv4l \
libyuv \
ffmpeg \
&& \
# Platform-specific hardware acceleration
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
pacman -S --noconfirm --needed \
libva libx11 libxcb libxau libxdmcp libmfx; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
pacman -S --noconfirm --needed \
libdrm libva; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
pacman -S --noconfirm --needed \
libdrm libva; \
fi && \
pacman -Scc --noconfirm && \
mkdir -p /etc/one-kvm/ventoy
# Copy init script
COPY --chmod=755 init.sh /init.sh
# Copy binaries (these are placed by the build script)
COPY --chmod=755 one-kvm ttyd gostc easytier-core /usr/bin/
# Copy ventoy resources if they exist
COPY ventoy/ /etc/one-kvm/ventoy/
# Entrypoint
CMD ["/init.sh"]