-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (25 loc) · 851 Bytes
/
Dockerfile
File metadata and controls
39 lines (25 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Build stage
FROM python:3.14-slim AS builder
COPY --from=ghcr.io/astral-sh/uv:0.9 /uv /usr/local/bin/uv
WORKDIR /app
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev --no-install-project
COPY s3proxy/ ./s3proxy/
RUN uv sync --frozen --no-dev
# Runtime stage
FROM python:3.14-slim
RUN useradd --create-home --shell /bin/bash s3proxy
WORKDIR /app
COPY --from=builder --chown=s3proxy:s3proxy /app/.venv /app/.venv
COPY --from=builder --chown=s3proxy:s3proxy /app/s3proxy /app/s3proxy
USER s3proxy
ENV PATH="/app/.venv/bin:$PATH" \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1
ENV S3PROXY_IP=0.0.0.0 \
S3PROXY_PORT=4433 \
S3PROXY_NO_TLS=true \
S3PROXY_REGION=us-east-1 \
S3PROXY_LOG_LEVEL=INFO
EXPOSE 4433
CMD ["uvicorn", "s3proxy.main:app", "--host", "0.0.0.0", "--port", "4433", "--loop", "uvloop"]