Skip to content

Commit ffb791c

Browse files
committed
fixup, set the HOME env variable correctly this time
1 parent 8d06605 commit ffb791c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

base/c9s-python-3.9/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ FROM quay.io/centos/centos:stream9
33
# perform the setup that python image used to do for us
44
# but this way it uses a lot less disk space (hundreds of megabytes less)
55
ENV APP_ROOT="/opt/app-root"
6-
ENV HOME="${APP_ROOT}"
6+
ENV HOME="${APP_ROOT}/src"
77
ENV VIRTUAL_ENV="${APP_ROOT}"
88
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
99
ENV PYTHON_VERSION=3.9
1010
ENV PIP_NO_CACHE_DIR=off
11-
RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \
12-
useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \
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}" \
1313
--comment "Default Application User" --shell /bin/bash default && \
1414
dnf install -y python3-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/

base/ubi9-python-3.11/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ FROM registry.access.redhat.com/ubi9/ubi:latest
33
# perform the setup that python s2i image used to do for us
44
# but this way it uses a lot less disk space (hundreds of megabytes less)
55
ENV APP_ROOT="/opt/app-root"
6-
ENV HOME="${APP_ROOT}"
6+
ENV HOME="${APP_ROOT}/src"
77
ENV VIRTUAL_ENV="${APP_ROOT}"
88
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
99
ENV PYTHON_VERSION=3.11
1010
ENV PIP_NO_CACHE_DIR=off
11-
RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \
12-
useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \
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}" \
1313
--comment "Default Application User" --shell /bin/bash default && \
1414
dnf install -y python311-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/

base/ubi9-python-3.9/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ FROM registry.access.redhat.com/ubi9/ubi:latest
33
# perform the setup that python s2i image used to do for us
44
# but this way it uses a lot less disk space (hundreds of megabytes less)
55
ENV APP_ROOT="/opt/app-root"
6-
ENV HOME="${APP_ROOT}"
6+
ENV HOME="${APP_ROOT}/src"
77
ENV VIRTUAL_ENV="${APP_ROOT}"
88
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
99
ENV PYTHON_VERSION=3.9
1010
ENV PIP_NO_CACHE_DIR=off
11-
RUN mkdir --parents "${APP_ROOT}/src" && chmod --recursive 0771 ${APP_ROOT} && chown --recursive 1001:0 ${APP_ROOT} && \
12-
useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \
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}" \
1313
--comment "Default Application User" --shell /bin/bash default && \
1414
dnf install -y python3-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/

0 commit comments

Comments
 (0)