# One-KVM Runtime Image # This Dockerfile only packages pre-compiled binaries (no compilation) # Used after cross-compiling with `cross build` ARG TARGETPLATFORM=linux/amd64 FROM debian:12-slim ARG TARGETPLATFORM # Install runtime dependencies in a single layer # Static linked: FFmpeg core, libyuv, libvpx, libjpeg-turbo # Dynamic linked: hardware acceleration drivers, GPL codecs (x264/x265) RUN apt-get update && \ apt-get install -y --no-install-recommends \ # Core runtime (all platforms) libasound2 \ libv4l-0 \ libudev1 \ libdrm2 \ libopus0 \ ca-certificates \ # GPL codecs (must be dynamic for license compliance) libx264-164 \ libx265-199 && \ # Platform-specific hardware acceleration if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ apt-get install -y --no-install-recommends \ libva2 libva-drm2 libva-x11-2 libx11-6 libxcb1 libmfx1; \ fi && \ rm -rf /var/lib/apt/lists/* && \ 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"]