2024-07-08 21:04:23 +03:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
2025-07-24 05:10:41 +03:00
|
|
|
FROM debian:12-slim
|
2025-07-24 01:18:17 +03:00
|
|
|
|
2025-07-24 05:10:41 +03:00
|
|
|
# Install only essential runtime dependencies
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
2025-07-24 01:18:17 +03:00
|
|
|
ca-certificates \
|
2025-07-24 05:10:41 +03:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2025-07-24 01:18:17 +03:00
|
|
|
|
2025-07-24 04:50:08 +03:00
|
|
|
# Copy the CLI binary (without GUI dependencies)
|
2025-07-24 03:11:53 +03:00
|
|
|
ARG TARGETARCH
|
|
|
|
COPY bin/linux_${TARGETARCH}/khm /usr/local/bin/khm
|
2025-07-24 01:18:17 +03:00
|
|
|
RUN chmod +x /usr/local/bin/khm
|
|
|
|
|
2025-07-24 04:50:08 +03:00
|
|
|
# Create non-root user
|
2025-07-24 05:10:41 +03:00
|
|
|
RUN useradd -m -u 1000 khm
|
2025-07-24 04:50:08 +03:00
|
|
|
USER khm
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/khm"]
|