File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ FROM quay.io/centos/centos:stream9
4
4
# but this way it uses a lot less disk space (hundreds of megabytes less)
5
5
ENV VIRTUAL_ENV="/opt/app-root"
6
6
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" \
8
9
--comment "Default Application User" --shell /bin/bash default && \
9
10
dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/*
10
11
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ FROM registry.access.redhat.com/ubi9/ubi:latest
4
4
# but this way it uses a lot less disk space (hundreds of megabytes less)
5
5
ENV VIRTUAL_ENV="/opt/app-root"
6
6
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" \
8
9
--comment "Default Application User" --shell /bin/bash default && \
9
10
dnf install -y python311-pip && dnf clean all && rm -rf /var/cache/yum/* && \
10
11
python3.11 -m venv "${VIRTUAL_ENV}"
Original file line number Diff line number Diff line change @@ -4,12 +4,13 @@ FROM registry.access.redhat.com/ubi9/ubi:latest
4
4
# but this way it uses a lot less disk space (hundreds of megabytes less)
5
5
ENV VIRTUAL_ENV="/opt/app-root"
6
6
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" \
8
9
--comment "Default Application User" --shell /bin/bash default && \
9
10
dnf install -y python3-pip && dnf clean all && rm -rf /var/cache/yum/*
10
11
11
12
USER 1001
12
- python3.9 -m venv "${VIRTUAL_ENV}"
13
+ RUN python3.9 -m venv "${VIRTUAL_ENV}"
13
14
14
15
LABEL name="odh-notebook-base-ubi9-python-3.9" \
15
16
summary="Python 3.9 base image for ODH notebooks" \
You can’t perform that action at this time.
0 commit comments