Skip to content

Commit 487905c

Browse files
committed
fixup, mkdir home directory first
1 parent 7e63819 commit 487905c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/ubi9-python-3.11/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ FROM registry.access.redhat.com/ubi9/ubi:latest
44
# but this way it uses a lot less disk space (hundreds of megabytes less)
55
ENV VIRTUAL_ENV="/opt/app-root"
66
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
7-
RUN useradd --uid 1001 --gid 0 --create-home --base-dir / --home-dir /opt/app-root/src \
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" \
89
--comment "Default Application User" --shell /bin/bash default && \
910
dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \
1011
python3.11 -m venv "${VIRTUAL_ENV}"

0 commit comments

Comments
 (0)