2024-07-08 21:04:23 +03:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
2025-07-24 04:50:08 +03:00
|
|
|
FROM alpine:3.19
|
2025-07-24 01:18:17 +03:00
|
|
|
|
2025-07-24 05:01:04 +03:00
|
|
|
# Install glibc compatibility for Alpine
|
2025-07-24 04:50:08 +03:00
|
|
|
RUN apk add --no-cache \
|
2025-07-24 01:18:17 +03:00
|
|
|
ca-certificates \
|
2025-07-24 05:01:04 +03:00
|
|
|
gcompat \
|
2025-07-24 04:50:08 +03:00
|
|
|
libgcc \
|
|
|
|
libstdc++
|
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
|
|
|
|
RUN adduser -D -u 1000 khm
|
|
|
|
USER khm
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/khm"]
|