You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.3 KiB

FROM registry.access.redhat.com/ubi7/ubi:7.9
VOLUME /payload
RUN yum update -y && \
yum install python-virtualenv python-setuptools make git -y
# NOTE(ivasilev,pstodulk) We need at least pip v10.0.1, however centos:7
# provides just v8.1.2 (via EPEL). So do this: install epel repos -> install
# python2-pip -> use pip to update to specific pip version we require. period
# NOTE(pstodulk) I see we take care about pip for py3 inside the Makefile,
# however I am afraid of additional possible troubles in future because of the
# archaic pip3 version (v9.0.1). As we want to run tests for Py2 and Py3 in ci
# always anyway, let's put py3 installation here as well..
# Dropped Python3 as it is now added in its own container on RHEL8
# This is some trickery: We install python27-python-pip from the scl, use the scl to bootstrap the python
# module of pip version 20.3.0 and then make it update to 20.3.4 resulting the 'pip' command to be available.
# The --target approach doesn't add it, but at least we now have pip 20.3.4 installed ;-)
RUN yum -y install python27-python-pip && \
scl enable python27 -- pip install -U --target /usr/lib/python2.7/site-packages/ pip==20.3.0 && \
python -m pip install --ignore-installed pip==20.3.4 ipaddress virtualenv
WORKDIR /payload
ENTRYPOINT make install-deps && make test