Skip to content

Commit 917d083

Browse files
authored
Merge pull request #253 from ligangty/deps
Update Containerfile to use pip wheel way to install
2 parents 97c2af1 + c56dab2 commit 917d083

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

image/Containerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ FROM registry.access.redhat.com/ubi8-minimal:latest as builder
2323

2424
ARG GIT_BRANCH=main
2525

26-
RUN microdnf install -y git-core python3.9 && microdnf clean all
26+
RUN microdnf install -y git-core python3.12 python3.12-pip && microdnf clean all
2727
RUN git clone -b ${GIT_BRANCH} --depth 1 https://github.com/Commonjava/charon.git
2828
RUN pip3 install --no-cache-dir --upgrade pip
2929
RUN pip3 wheel ./charon
@@ -38,7 +38,7 @@ WORKDIR ${HOME_DIR}
3838

3939
USER root
4040

41-
RUN microdnf install -y python3.9 shadow-utils && microdnf clean all
41+
RUN microdnf install -y python3.12 python3.12-pip shadow-utils && microdnf clean all
4242
RUN useradd -d ${HOME_DIR} -u ${UID} -g 0 -m -s /bin/bash ${USER} \
4343
&& chown ${USER}:0 ${HOME_DIR} \
4444
&& chmod -R g+rwx ${HOME_DIR} \
@@ -47,14 +47,12 @@ RUN useradd -d ${HOME_DIR} -u ${UID} -g 0 -m -s /bin/bash ${USER} \
4747
COPY --from=builder ./charon/image/2022-IT-Root-CA.pem /etc/pki/ca-trust/source/anchors/2022-IT-Root-CA.pem
4848
RUN update-ca-trust extract
4949

50-
COPY --from=builder ./charon/requirements.txt ./
5150
COPY --from=builder ./*.whl ./
5251
RUN pip3 install --no-cache-dir --upgrade pip
53-
RUN pip3 install --no-cache-dir -r ./requirements.txt
5452
RUN pip3 install --no-cache-dir ./*.whl
55-
RUN rm -rf ./requirements.txt ./*.whl
53+
RUN rm ./*.whl
5654

57-
RUN microdnf remove shadow-utils && microdnf clean all
55+
RUN microdnf remove python3.12-pip shadow-utils && microdnf clean all
5856

5957
USER ${USER}
6058

0 commit comments

Comments
 (0)