# Alpine Linux with UV-managed Python
# Shows how to use UV to install Python on Alpine Linux
FROM ghcr.io/astral-sh/uv:latest as uv
FROM alpine:3.22

# Install minimal dependencies for uv
# Note: Alpine needs gcompat for glibc compatibility
RUN apk add --no-cache \
    curl \
    ca-certificates \
    gcompat

# Copy uv
COPY --from=uv /uv /uvx /bin/

# Install Python 3.13 using uv
RUN uv python install 3.13

# Verify installation
RUN uv python list && \
    uv run python --version

WORKDIR /app

CMD ["/bin/sh"]