-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 757 Bytes
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 757 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
FROM python:3.14-alpine AS base-image
ARG VERSION
WORKDIR /service
# Install build dependencies
RUN apk add --no-cache --virtual .build-deps \
gcc \
musl-dev \
libffi-dev \
cargo \
rust
# Install UV
RUN pip install --no-cache-dir uv
# Add project files
COPY pyproject.toml uv.lock README.md ./
COPY soxy ./soxy
# Install dependencies and build the project
RUN uv sync --no-dev && \
uv build
# Create virtual environment and install the built package
RUN python -m venv .venv && \
.venv/bin/pip install dist/*.whl
FROM python:3.14-alpine AS runtime-image
WORKDIR /service
# Copy virtual environment from the build stage
COPY --from=base-image /service/.venv ./.venv
# Set entrypoint
ENTRYPOINT ["/service/.venv/bin/soxy"]