File tree Expand file tree Collapse file tree 4 files changed +62
-6
lines changed Expand file tree Collapse file tree 4 files changed +62
-6
lines changed Original file line number Diff line number Diff line change @@ -3,5 +3,23 @@ FROM ${SPLUNK_PRODUCT}-centos-7:latest
33USER root
44
55RUN yum -y update
6- RUN yum -y install python36 python36-requests
7- RUN python3 -m ensurepip
6+ RUN yum -y install gcc openssl-devel bzip2-devel libffi-devel python-pip
7+ # INFRA-15385: manual installation of python 3.7 as default distro version is 3.6
8+ RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
9+ && tar xzf Python-3.7.4.tgz \
10+ && cd Python-3.7.4 \
11+ && ./configure --enable-optimizations --prefix=/usr \
12+ && make install \
13+ && cd .. \
14+ && rm Python-3.7.4.tgz \
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+ RUN yum remove -y --setopt=tsflags=noscripts gcc openssl-devel bzip2-devel libffi-devel \
23+ && yum autoremove -y \
24+ && yum clean all
25+ RUN pip3 --no-cache-dir install ansible requests
Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ ARG SPLUNK_PRODUCT=splunk
22FROM ${SPLUNK_PRODUCT}-debian-10:latest
33USER root
44
5- RUN apt update
5+ RUN apt-get update
66RUN apt-get install -y --no-install-recommends python3 python3-pip python3-setuptools python3-requests python3-yaml
77RUN pip3 --no-cache-dir install ansible
Original file line number Diff line number Diff line change @@ -3,4 +3,24 @@ FROM ${SPLUNK_PRODUCT}-debian-9:latest
33USER root
44
55RUN apt-get update
6- RUN apt-get install -y --no-install-recommends python3 python3-pip python3-requests
6+ RUN apt-get install -y gcc make \
7+ build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev \
8+ libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
9+ # INFRA-15385: manual installation of python 3.7 as default distro version is 3.5
10+ RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
11+ && tar xzf Python-3.7.4.tgz \
12+ && cd Python-3.7.4 \
13+ && ./configure --enable-optimizations --prefix=/usr \
14+ && make install \
15+ && cd .. \
16+ && rm Python-3.7.4.tgz \
17+ && rm -r Python-3.7.4 \
18+ && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
19+ && python3.7 get-pip.py \
20+ && rm -f get-pip.py
21+ # removing all intermediate dependencies. All the stuff below comes up to 200+MB
22+ RUN apt-get remove --purge -y gcc make build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev \
23+ libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev \
24+ && apt autoremove -y \
25+ && apt autoclean
26+ RUN pip3 --no-cache-dir install ansible requests
Original file line number Diff line number Diff line change @@ -2,6 +2,24 @@ ARG SPLUNK_PRODUCT=splunk
22FROM ${SPLUNK_PRODUCT}-redhat-8:latest
33USER root
44
5- RUN microdnf -y --nodocs install python3
6- RUN alternatives --set python /usr/bin/python2
5+ RUN microdnf -y update \
6+ && microdnf -y install make gcc openssl-devel bzip2-devel libffi-devel
7+ # INFRA-15385: manual installation of python 3.7 as default distro version is 3.6
8+ RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
9+ && tar xzf Python-3.7.4.tgz \
10+ && cd Python-3.7.4 \
11+ && ./configure --enable-optimizations --prefix=/usr \
12+ && make install \
13+ && cd .. \
14+ && rm Python-3.7.4.tgz \
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
725RUN pip3 -q --no-cache-dir install requests ansible
You can’t perform that action at this time.
0 commit comments