Skip to content

Commit 9d07152

Browse files
Add support for python 3.12 in dockerfile (#1037)
Signed-off-by: Alex <[email protected]>
1 parent a223df4 commit 9d07152

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

tools/docker/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ FROM quay.io/centos/centos:stream9
22

33
ARG USER_ID=${USER_ID:-1001}
44
ARG STATIC_ROOT=/var/lib/eda/static
5+
6+
# python3.11 and python3.12 supported
7+
ARG PYTHON_BIN="python3.11"
8+
59
RUN useradd --uid "$USER_ID" --gid 0 --home-dir /app --create-home eda \
610
&& mkdir -p /app/.local /var/lib/eda/ \
711
&& chown -R "${USER_ID}:0" /app/.local /var/lib/eda \
@@ -13,10 +17,11 @@ RUN mkdir -p /var/lib/eda/redis-tls \
1317
COPY ./tools/docker/redis-tls /var/lib/eda/redis-tls
1418

1519
RUN DNF=dnf \
16-
INSTALL_PACKAGES="python3.11 \
17-
python3.11-devel \
18-
python3.11-pip \
20+
INSTALL_PACKAGES="${PYTHON_BIN} \
21+
${PYTHON_BIN}-devel \
22+
${PYTHON_BIN}-pip \
1923
libpq-devel \
24+
libffi-devel \
2025
gcc \
2126
gettext \
2227
git-core \
@@ -28,7 +33,7 @@ RUN DNF=dnf \
2833
&& rm -rf /var/cache/dnf
2934

3035
USER "$USER_ID"
31-
ENV POETRY_VERSION="1.7.1" \
36+
ENV POETRY_VERSION="1.8.3" \
3237
PYTHONDONTWRITEBYTECODE=1 \
3338
PYTHONUNBUFFERED=1 \
3439
PIP_NO_CACHE_DIR=1 \
@@ -37,7 +42,6 @@ ENV POETRY_VERSION="1.7.1" \
3742
VIRTUAL_ENV=/app/venv \
3843
SOURCES_DIR=/app/src \
3944
PATH="/app/.local/bin:$PATH" \
40-
PYTHON_BIN="python3.11" \
4145
HOME="/app"
4246

4347
# Install poetry, create virtual environment

0 commit comments

Comments
 (0)