Skip to content

Commit 7846614

Browse files
authored
Merge pull request #354 from Helene/dockerfile_pip
Skip pip remove step in Dockerfile by building image from python as base image
2 parents 4b8ce5c + a30571a commit 7846614

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,11 @@ RUN if [ $(expr "$BASE" : '.*python.*') -eq 0 ]; then \
103103
python3 -m pip install -r /root/requirements_ubi9.txt && \
104104
echo "Installed python version: $(python3 -V)" && \
105105
echo "Installed python packages: $(python3 -m pip list)" && \
106-
yum clean all -y; else \
106+
yum clean all -y && rm -rf /usr/bin/pip*; else \
107107
echo "Already using python container as base image. No need to install it." && \
108108
python3 -m pip install -r /root/requirements.in && \
109109
echo "Installed python packages: $(python3 -m pip list)"; fi
110110

111-
RUN rm -rf /usr/bin/pip*
112-
113111
USER root
114112

115113
RUN mkdir -p /opt/IBM/bridge /opt/IBM/zimon /var/mmfs/gen && \

0 commit comments

Comments
 (0)