-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (26 loc) · 801 Bytes
/
Copy pathDockerfile
File metadata and controls
39 lines (26 loc) · 801 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
FROM python:3.14-alpine3.24 AS builder
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
ENV UV_LINK_MODE=copy
ENV UV_PYTHON_DOWNLOADS=0
WORKDIR /app
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=requirements.txt,target=requirements.txt \
uv venv \
&& uv pip install -r requirements.txt
COPY . .
RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install .
FROM python:3.14-alpine3.24
ENV PYTHONUNBUFFERED=1
RUN apk add --no-cache \
ca-certificates \
git \
git-lfs \
&& addgroup -g 1000 appuser \
&& adduser -D -u 1000 -G appuser appuser \
&& git lfs install
COPY --from=builder --chown=appuser:appuser /app/.venv /app/.venv
WORKDIR /app
USER appuser
ENV PATH="/app/.venv/bin:$PATH"
ENTRYPOINT ["gitlab-backup"]