Skip to content

Commit e8bc0c3

Browse files
committed
fixup, set APP_ROOT env variable
1 parent 4f8370c commit e8bc0c3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

base/ubi9-python-3.11/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ FROM registry.access.redhat.com/ubi9/ubi:latest
22

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)
5-
ENV VIRTUAL_ENV="/opt/app-root"
5+
ENV APP_ROOT="/opt/app-root"
6+
ENV VIRTUAL_ENV="${APP_ROOT}"
67
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
7-
RUN mkdir --parents --mode 0771 "${VIRTUAL_ENV}/src" && chown --recursive 1001:0 ${VIRTUAL_ENV} && \
8-
useradd --uid 1001 --gid 0 --home-dir "${VIRTUAL_ENV}/src" \
8+
RUN mkdir --parents --mode 0771 "${APP_ROOT}/src" && chown --recursive 1001:0 ${APP_ROOT} && \
9+
useradd --uid 1001 --gid 0 --no-create-home --home-dir "${APP_ROOT}/src" \
910
--comment "Default Application User" --shell /bin/bash default && \
1011
dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \
1112
COPY --from=quay.io/sclorg/s2i-core-c9s:latest /usr/bin/fix-permissions /usr/bin/fix-permissions

0 commit comments

Comments
 (0)