Skip to content

Commit c5c45d4

Browse files
move all symlinking
1 parent 7992f8a commit c5c45d4

File tree

10 files changed

+17
-10
lines changed

10 files changed

+17
-10
lines changed

base/centos-7/install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ rm -rf /etc/security/limits.d/20-nproc.conf
4747
# Clean
4848
yum clean all
4949
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

base/centos-8/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ echo "
4949

5050
# symlink for python3
5151
ln -s /bin/python3 /bin/python
52+
ln -sf /usr/bin/pip3.7 /usr/bin/pip3
5253

5354
# Clean
5455
yum clean all

base/debian-10/install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,7 @@ chmod u+s /bin/ping
9292
# Clean
9393
apt clean autoclean
9494
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

base/debian-9/install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,7 @@ chmod u+s /bin/ping
9393
# Clean
9494
apt clean autoclean
9595
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

py23-image/centos-7/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
1717
&& python3.7 get-pip.py \
1818
&& rm -f get-pip.py \
1919
#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
2221
RUN yum remove -y --setopt=tsflags=noscripts gcc openssl-devel bzip2-devel libffi-devel \
2322
&& yum autoremove -y \
2423
&& yum clean all

py23-image/centos-8/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ RUN wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz \
1818
&& python3.7 get-pip.py \
1919
&& rm -f get-pip.py \
2020
# 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
2322
# add python alias
2423
# && ln -s /bin/python3 /bin/python
2524

py23-image/debian-10/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ USER root
44

55
RUN apt-get update -y \
66
&& 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 \
97
&& ln -sf /usr/bin/python3.7 /usr/bin/python \
108
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip \
119
&& pip3 install --upgrade ansible==3.4.0 requests==2.25.1 pyyaml==5.4.1 jmespath==0.10.0

py23-image/debian-9/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ USER root
44

55
RUN apt-get update -y \
66
&& 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 \
97
&& ln -sf /usr/bin/python3.7 /usr/bin/python \
108
&& ln -sf /usr/bin/pip3.7 /usr/bin/pip \
119
&& pip3 install --upgrade ansible==3.4.0 requests==2.25.1 pyyaml==5.4.1 jmespath==0.10.0

py23-image/redhat-8/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ RUN microdnf -y --nodocs update \
88
&& pip2 --no-cache-dir install requests pyyaml jmespath \
99
&& ln -sf /usr/bin/python3.9 /usr/bin/python \
1010
&& 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 \
12-
&& sed -i '/^\[defaults\]/a\interpreter_python = /usr/bin/python3' /opt/ansible/ansible.cfg
11+
&& pip3 install --upgrade requests==2.25.1 pyyaml==5.4.1 jmespath==0.10.0

splunk/common-files/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ RUN sed -i -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL\nans
112112
&& chgrp ${ANSIBLE_GROUP} ${SPLUNK_ANSIBLE_HOME} ${SPLUNK_ANSIBLE_HOME}/ansible.cfg \
113113
&& chmod 775 ${SPLUNK_ANSIBLE_HOME} \
114114
&& chmod 664 ${SPLUNK_ANSIBLE_HOME}/ansible.cfg \
115+
&& sed -i '/^\[defaults\]/a\interpreter_python = /usr/bin/python3' ${SPLUNK_ANSIBLE_HOME}/ansible.cfg \
115116
&& chmod 755 /sbin/entrypoint.sh /sbin/createdefaults.py /sbin/checkstate.sh
116117

117118
USER ${ANSIBLE_USER}

0 commit comments

Comments
 (0)