-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.scripts
More file actions
39 lines (29 loc) · 981 Bytes
/
Dockerfile.scripts
File metadata and controls
39 lines (29 loc) · 981 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
# Set up image based on uv / Python3.11
FROM ghcr.io/astral-sh/uv:0.10.4-python3.11-trixie
RUN apt-get update \
&& apt-get install -y ca-certificates --no-install-recommends \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
NO_COLOR=1 \
UV_COMPILE_BYTECODE=1 \
UV_NO_DEV=1 \
PATH="/code/.venv/bin:$PATH" \
SENTRY_RELEASE=$SENTRY_RELEASE
WORKDIR /code
# Create runtime user early so COPY --chown can resolve app:app.
RUN useradd --create-home --uid 10001 app
# Copy dependency manifests
COPY uv.lock pyproject.toml /code/
# Install dependencies
RUN uv sync --locked --color never
RUN chown -R app:app /code/.venv
# Disable uv's sync lockfile checking,
# since we won't be modifying dependencies in the container.
ENV UV_NO_SYNC=1
COPY --chown=app:app . /code
USER app
ENTRYPOINT [ "python", "-m", "pingpong.scripts" ]
CMD [ "--help" ]