Skip to content

Commit 200c226

Browse files
author
Irving Popovetsky
committed
go straight to python 3.14
1 parent bfcffa4 commit 200c226

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

docker/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM python:3.12-slim AS base
1+
FROM python:3.14-slim AS base
2+
3+
RUN apt-get update && apt-get upgrade -y && apt clean
24

35
FROM base AS builder
46

@@ -24,7 +26,7 @@ COPY pyproject.toml poetry.lock README.md logging.yml ./
2426
COPY pybot ./pybot
2527

2628
# Install dependencies into .venv in project
27-
RUN poetry install --only=main --no-interaction --no-cache && \
29+
RUN poetry install --only=main --no-interaction --no-cache --compile && \
2830
rm -rf $POETRY_CACHE_DIR
2931

3032
# Production image

docker/Dockerfile.test.py314

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# docker/Dockerfile.test.py314
2+
# For testing Python 3.14 compatibility
3+
4+
FROM python:3.14-slim
5+
6+
ENV PIP_DISABLE_PIP_VERSION_CHECK=on \
7+
PYTHONUNBUFFERED=1
8+
9+
WORKDIR /app
10+
11+
# Install system dependencies
12+
RUN apt-get update && apt-get install -y --no-install-recommends \
13+
build-essential \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
# Install poetry
17+
RUN pip install poetry
18+
19+
# Copy dependency files
20+
COPY pyproject.toml poetry.lock README.md ./
21+
COPY pybot ./pybot
22+
23+
# Install dependencies (including dev) in venv
24+
RUN pip install --upgrade pip poetry && \
25+
python -m venv /opt/venv && \
26+
/opt/venv/bin/pip install --upgrade pip && \
27+
/opt/venv/bin/pip install poetry && \
28+
/opt/venv/bin/poetry install --no-interaction
29+
30+
# Set PATH to use venv
31+
ENV PATH="/opt/venv/bin:$PATH"
32+
33+
# Copy test files
34+
COPY tests ./tests
35+
36+
# Default command: run tests
37+
CMD ["poetry", "run", "pytest", "-v", "--tb=short"]

0 commit comments

Comments
 (0)