Skip to content

Commit ce7b943

Browse files
committed
added redhat
1 parent 28f9a73 commit ce7b943

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

py23-image/centos-7/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
2020
&& ln -sf /usr/bin/pip2 /usr/bin/pip \
2121
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip3
2222
RUN yum remove -y --setopt=tsflags=noscripts gcc openssl-devel bzip2-devel libffi-devel \
23-
&& yum -y autoremove \
23+
&& yum autoremove -y \
2424
&& yum clean all
2525
RUN pip3 --no-cache-dir install ansible requests

py23-image/redhat-8/Dockerfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@ ARG SPLUNK_PRODUCT=splunk
22
FROM ${SPLUNK_PRODUCT}-redhat-8:latest
33
USER root
44

5+
RUN microdnf -y update \
6+
&& microdnf -y install make gcc openssl-devel bzip2-devel libffi-devel
57
# INFRA-15385: manual installation of python 3.7 as default distro version is 3.6
68
RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
79
&& tar xzf Python-3.7.4.tgz \
810
&& cd Python-3.7.4 \
911
&& ./configure --enable-optimizations --prefix=/usr \
10-
&& make altinstall \
12+
&& make install \
1113
&& cd .. \
1214
&& rm Python-3.7.4.tgz \
13-
&& rm -r Python-3.7.4
15+
&& rm -r Python-3.7.4 \
16+
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
17+
&& python3.7 get-pip.py \
18+
&& rm -f get-pip.py \
19+
#pip version is not automatically "fixed", unlike debian-based
20+
&& ln -sf /usr/bin/pip2 /usr/bin/pip \
21+
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip3
22+
#microdnf persists metadata which is a problem for removing packages. So have to clean first before removing.
23+
RUN microdnf clean all \
24+
&& microdnf remove -y gcc make openssl-devel bzip2-devel libffi-devel
1425
RUN pip3 -q --no-cache-dir install requests ansible

0 commit comments

Comments
 (0)