# syntax=docker/dockerfile:1
# Minimal image that ships the s3mbura CLI.
FROM python:3.13-slim AS build
WORKDIR /src
COPY pyproject.toml README.md ./
COPY src ./src
RUN pip install --no-cache-dir build && python -m build --wheel

FROM python:3.13-slim
# Run as a non-root user; the tool needs no privileges.
RUN useradd --create-home --uid 10001 s3mbura
COPY --from=build /src/dist/*.whl /tmp/
RUN pip install --no-cache-dir /tmp/*.whl && rm -f /tmp/*.whl
USER s3mbura
ENTRYPOINT ["s3mbura"]
CMD ["--help"]
