Skip to content

Commit

Permalink
Merge pull request openshift-scale#34 from jupierce/python3_in_base
Browse files Browse the repository at this point in the history
Bug 1873414: Install python3 in ubi8 base to emulate ubi7
  • Loading branch information
bparees authored Aug 28, 2020
2 parents ef1d675 + aaeb436 commit 0d6d354
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-base-openshift-4.6

# ubi8 does not have a python binary in PATH. Installing it explicitly if /usr/bin/python
# does not exist so this image is consistent with the ubi7 base.

RUN INSTALL_PKGS=" \
which tar wget hostname shadow-utils \
socat findutils lsof bind-utils gzip \
Expand All @@ -7,6 +11,7 @@ RUN INSTALL_PKGS=" \
if [ ! -e /usr/bin/yum ]; then ln -s /usr/bin/microdnf /usr/bin/yum; fi && \
echo 'skip_missing_names_on_install=0' >> /etc/yum.conf && \
yum install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
( test -e /usr/bin/python || ( yum install -y --setopt=tsflags=nodocs python3 && alternatives --set python /usr/bin/python3 ) ) && \
yum clean all && rm -rf /var/cache/*
LABEL io.k8s.display-name="OpenShift Base" \
io.k8s.description="This is the base image from which all OpenShift images inherit."

0 comments on commit 0d6d354

Please sign in to comment.