# =============================================================================
# Horkos Docker Image
# =============================================================================
# Usage:
#   docker run --rm -v $(pwd):/workspace ghcr.io/aimable100/horkos compile
#
# =============================================================================

FROM debian:bookworm-slim

# Labels for GitHub Container Registry
LABEL org.opencontainers.image.source="https://github.com/aimable100/horkos"
LABEL org.opencontainers.image.description="Infrastructure language where insecure code won't compile"
LABEL org.opencontainers.image.licenses="MIT OR Apache-2.0"

# Install CA certificates for HTTPS
RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Copy binary from build context
ARG TARGETOS
ARG TARGETARCH
COPY bin/${TARGETOS}/${TARGETARCH}/horkos /usr/local/bin/horkos

# Create non-root user
RUN useradd -m -s /bin/bash horkos
USER horkos

# Set working directory
WORKDIR /workspace

# Default command
ENTRYPOINT ["horkos"]
CMD ["--help"]

