-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 805 Bytes
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 805 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
# syntax=docker/dockerfile:1
FROM ubuntu:24.04
ARG UID=1001
ARG GID=1001
# Create user with home dir
RUN groupadd --gid $GID sedr && \
useradd \
--create-home \
--uid $UID \
--gid sedr \
sedr
# Install uv 0.7.14, locked to hash
COPY --from=ghcr.io/astral-sh/uv@sha256:cda0fdc9b6066975ba4c791597870d18bc3a441dfc18ab24c5e888c16e15780c /uv /uvx /usr/local/bin/
USER sedr
# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1
# Copy from the cache instead of linking since it's a mounted volume
ENV UV_LINK_MODE=copy
# uv will skip updating the environment
ENV UV_NO_SYNC=1
# Set workdir
WORKDIR /app
COPY pyproject.toml pytest.ini ./
COPY sedr/ ./sedr/
# Install dependencies, using cache from host
RUN --mount=type=cache,target=/root/.cache/uv uv sync
ENTRYPOINT ["uv", "run", "sedr"]