File tree 13 files changed +29
-18
lines changed
13 files changed +29
-18
lines changed Original file line number Diff line number Diff line change @@ -47,3 +47,7 @@ rm -rf /etc/security/limits.d/20-nproc.conf
47
47
# Clean
48
48
yum clean all
49
49
rm -rf /anaconda-post.log /var/log/anaconda/*
50
+
51
+ # symlink for python3
52
+ ln -s /bin/python3 /bin/python
53
+ ln -sf /usr/bin/pip3.7 /usr/bin/pip3
Original file line number Diff line number Diff line change 49
49
50
50
# symlink for python3
51
51
ln -s /bin/python3 /bin/python
52
+ ln -sf /usr/bin/pip3.7 /usr/bin/pip3
52
53
53
54
# Clean
54
55
yum clean all
Original file line number Diff line number Diff line change @@ -92,3 +92,7 @@ chmod u+s /bin/ping
92
92
# Clean
93
93
apt clean autoclean
94
94
rm -rf /var/lib/apt/lists/*
95
+
96
+ # Symlink python/pip
97
+ ln -sf /usr/bin/python3.7 /usr/bin/python3
98
+ ln -sf /usr/bin/pip3.7 /usr/bin/pip3
Original file line number Diff line number Diff line change @@ -93,3 +93,7 @@ chmod u+s /bin/ping
93
93
# Clean
94
94
apt clean autoclean
95
95
rm -rf /var/lib/apt/lists/*
96
+
97
+ # Symlink python/pip
98
+ ln -sf /usr/bin/python3.7 /usr/bin/python3
99
+ ln -sf /usr/bin/pip3.7 /usr/bin/pip3
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ LABEL name="splunk" \
28
28
ARG BUSYBOX_URL
29
29
30
30
ENV BUSYBOX_URL=${BUSYBOX_URL} \
31
- PYTHON_VERSION=3.7.16 \
32
- PYTHON_GPG_KEY_ID=0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
31
+ PYTHON_VERSION=3.9.19 \
32
+ PYTHON_GPG_KEY_ID=E3FF2839C048B25C084DEBE9B26995E310250568
33
33
34
34
COPY install.sh /install.sh
35
35
Original file line number Diff line number Diff line change 17
17
18
18
# Generate UTF-8 char map and locale
19
19
# Reinstalling local English def for now, removed in minimal image: https://bugzilla.redhat.com/show_bug.cgi?id=1665251
20
- microdnf -y --nodocs install glibc-langpack-en
20
+ # Comment below install until glibc update is available in minimal image: https://access.redhat.com/errata/RHSA-2024:2722
21
+ # microdnf -y --nodocs install glibc-langpack-en
21
22
22
23
# Currently there is no access to the UTF-8 char map. The following command is commented out until
23
24
# the base container can generate the locale.
@@ -71,10 +72,12 @@ make altinstall LDFLAGS="-Wl,--strip-all"
71
72
rm -rf /tmp/pyinstall
72
73
ln -sf /usr/bin/python${PY_SHORT} /usr/bin/python
73
74
ln -sf /usr/bin/pip${PY_SHORT} /usr/bin/pip
75
+ ln -sf /usr/bin/python${PY_SHORT} /usr/bin/python3
76
+ ln -sf /usr/bin/pip${PY_SHORT} /usr/bin/pip3
74
77
75
78
# Install splunk-ansible dependencies
76
79
cd /
77
- /usr/bin/python3.7 -m pip install --upgrade pip
80
+ /usr/bin/python3.9 -m pip install --upgrade pip
78
81
pip -q --no-cache-dir install --upgrade " requests_unixsocket<2.29" " requests<2.29" six wheel Mako " urllib3<2.0.0" certifi jmespath future avro cryptography lxml protobuf setuptools ansible
79
82
80
83
# Remove tests packaged in python libs
Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
17
17
&& python3.7 get-pip.py \
18
18
&& rm -f get-pip.py \
19
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
20
+ && ln -sf /usr/bin/pip2 /usr/bin/pip
22
21
RUN yum remove -y --setopt=tsflags=noscripts gcc openssl-devel bzip2-devel libffi-devel \
23
22
&& yum autoremove -y \
24
23
&& yum clean all
Original file line number Diff line number Diff line change @@ -18,8 +18,7 @@ RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
18
18
&& python3.7 get-pip.py \
19
19
&& rm -f get-pip.py \
20
20
# pip version is not automatically "fixed", unlike debian-based
21
- && ln -sf /usr/bin/pip2 /usr/bin/pip \
22
- && ln -sf /usr/bin/pip3.7 /usr/bin/pip3
21
+ && ln -sf /usr/bin/pip2 /usr/bin/pip
23
22
# add python alias
24
23
# && ln -s /bin/python3 /bin/python
25
24
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ USER root
4
4
5
5
RUN apt-get update -y \
6
6
&& apt-get install -y --no-install-recommends libpython-dev python-pip python-requests python-jmespath python-yaml \
7
- && ln -sf /usr/bin/python3.7 /usr/bin/python3 \
8
- && ln -sf /usr/bin/pip3.7 /usr/bin/pip3 \
9
7
&& ln -sf /usr/bin/python3.7 /usr/bin/python \
10
8
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip \
11
9
&& pip3 install --upgrade ansible==3.4.0 requests==2.25.1 pyyaml==5.4.1 jmespath==0.10.0
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ USER root
4
4
5
5
RUN apt-get update -y \
6
6
&& apt-get install -y --no-install-recommends libpython-dev python-pip python-requests python-jmespath python-yaml \
7
- && ln -sf /usr/bin/python3.7 /usr/bin/python3 \
8
- && ln -sf /usr/bin/pip3.7 /usr/bin/pip3 \
9
7
&& ln -sf /usr/bin/python3.7 /usr/bin/python \
10
8
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip \
11
9
&& pip3 install --upgrade ansible==3.4.0 requests==2.25.1 pyyaml==5.4.1 jmespath==0.10.0
Original file line number Diff line number Diff line change @@ -3,10 +3,9 @@ FROM ${SPLUNK_PRODUCT}-redhat-8:latest
3
3
USER root
4
4
5
5
RUN microdnf -y --nodocs update \
6
- && microdnf -y --nodocs install python2-pip python2-devel \
6
+ && microdnf -y --nodocs install python2 \
7
+ && pip2 install --upgrade pip \
7
8
&& pip2 --no-cache-dir install requests pyyaml jmespath \
8
- && ln -sf /usr/bin/python3.7 /usr/bin/python3 \
9
- && ln -sf /usr/bin/pip3.7 /usr/bin/pip3 \
10
- && ln -sf /usr/bin/python3.7 /usr/bin/python \
11
- && ln -sf /usr/bin/pip3.7 /usr/bin/pip \
12
- && pip3 install --upgrade ansible==3.4.0 requests==2.25.1 pyyaml==5.4.1 jmespath==0.10.0
9
+ && ln -sf /usr/bin/python3.9 /usr/bin/python \
10
+ && ln -sf /usr/bin/pip3.9 /usr/bin/pip \
11
+ && pip3 install --upgrade requests==2.25.1 pyyaml==5.4.1 jmespath==0.10.0
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ RUN sed -i -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL\nans
112
112
&& chgrp ${ANSIBLE_GROUP} ${SPLUNK_ANSIBLE_HOME} ${SPLUNK_ANSIBLE_HOME}/ansible.cfg \
113
113
&& chmod 775 ${SPLUNK_ANSIBLE_HOME} \
114
114
&& chmod 664 ${SPLUNK_ANSIBLE_HOME}/ansible.cfg \
115
+ && sed -i '/^\[ defaults\] /a\i nterpreter_python = /usr/bin/python3' ${SPLUNK_ANSIBLE_HOME}/ansible.cfg \
115
116
&& chmod 755 /sbin/entrypoint.sh /sbin/createdefaults.py /sbin/checkstate.sh
116
117
117
118
USER ${ANSIBLE_USER}
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ RUN sed -i -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL\nans
105
105
&& chgrp ${ANSIBLE_GROUP} ${SPLUNK_ANSIBLE_HOME} ${SPLUNK_ANSIBLE_HOME}/ansible.cfg \
106
106
&& chmod 775 ${SPLUNK_ANSIBLE_HOME} \
107
107
&& chmod 664 ${SPLUNK_ANSIBLE_HOME}/ansible.cfg \
108
+ && sed -i '/^\[ defaults\] /a\i nterpreter_python = /usr/bin/python3' ${SPLUNK_ANSIBLE_HOME}/ansible.cfg \
108
109
&& chmod 755 /sbin/entrypoint.sh /sbin/createdefaults.py /sbin/checkstate.sh
109
110
110
111
USER ${ANSIBLE_USER}
You can’t perform that action at this time.
0 commit comments