Skip to content

Commit 62b1538

Browse files
committed
fixups for python 3.11 when it got added
1 parent 20f3029 commit 62b1538

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

base/c9s-python-3.11/Dockerfile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
FROM quay.io/sclorg/python-311-c9s:c9s
1+
FROM quay.io/centos/centos:stream9
2+
3+
# perform the setup that python image used to do for us
4+
# but this way it uses a lot less disk space (hundreds of megabytes less)
5+
ENV APP_ROOT="/opt/app-root"
6+
ENV HOME="${APP_ROOT}/src"
7+
ENV VIRTUAL_ENV="${APP_ROOT}"
8+
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
9+
ENV PYTHON_VERSION=3.11
10+
ENV PIP_NO_CACHE_DIR=off
11+
RUN mkdir --parents "${HOME}" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \
12+
useradd --uid 1001 --gid 0 --no-create-home --home-dir "${HOME}" \
13+
--comment "Default Application User" --shell /bin/bash default && \
14+
dnf install -y python${PYTHON_VERSION}-pip && dnf clean all && rm -rf /var/cache/yum/*
15+
COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/
16+
17+
USER 1001
18+
RUN python${PYTHON_VERSION} -m venv "${VIRTUAL_ENV}"
219

320
ARG SOURCE_CODE=base/c9s-python-3.11
421

base/ubi9-python-3.11/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ENV PIP_NO_CACHE_DIR=off
1111
RUN mkdir --parents "${HOME}" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \
1212
useradd --uid 1001 --gid 0 --no-create-home --home-dir "${HOME}" \
1313
--comment "Default Application User" --shell /bin/bash default && \
14-
dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \
14+
dnf install -y python${PYTHON_VERSION}-pip && dnf clean all && rm -rf /var/cache/yum/* && \
1515
COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/rpm-file-permissions /usr/bin/
1616

1717
USER 1001

0 commit comments

Comments
 (0)