File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ARG python_version=3.11
1+ ARG python_version=3.14-slim
22
3- FROM --platform=linux/amd64 ghcr.io/owl-corp/python-poetry-base:$python_version-slim
3+ FROM python:$python_version AS builder
4+ COPY --from=ghcr.io/astral-sh/uv:0.9 /uv /bin/
5+
6+ ENV UV_COMPILE_BYTECODE=1 \
7+ UV_LINK_MODE=copy
48
59# Install project dependencies
610WORKDIR /app
7- COPY pyproject.toml poetry.lock ./
8- RUN poetry install --no-root --only dev,main
11+ RUN --mount=type=cache,target=/root/.cache/uv \
12+ --mount=type=bind,source=uv.lock,target=uv.lock \
13+ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \
14+ uv sync --no-install-project --frozen --group dev
915
1016# Copy the source code in last to optimize rebuilding the image
1117COPY . .
1218
1319# Install again, this time with the root project
14- RUN poetry install --only-root
20+ RUN uv pip install "pydis_core[all]@."
21+
22+ WORKDIR /app/dev
23+ ENV PATH="/app/.venv/bin:$PATH"
1524
16- ENTRYPOINT ["poetry " ]
17- CMD ["run" , "python" , " -m" , "bot" ]
25+ ENTRYPOINT ["python " ]
26+ CMD ["-m" , "bot" ]
You can’t perform that action at this time.
0 commit comments