File tree Expand file tree Collapse file tree 10 files changed +17
-10
lines changed Expand file tree Collapse file tree 10 files changed +17
-10
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
4747# Clean
4848yum clean all
4949rm -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 4949
5050# symlink for python3
5151ln -s /bin/python3 /bin/python
52+ ln -sf /usr/bin/pip3.7 /usr/bin/pip3
5253
5354# Clean
5455yum clean all
Original file line number Diff line number Diff line change @@ -92,3 +92,7 @@ chmod u+s /bin/ping
9292# Clean
9393apt clean autoclean
9494rm -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
9393# Clean
9494apt clean autoclean
9595rm -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 @@ -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
2221RUN yum remove -y --setopt=tsflags=noscripts gcc openssl-devel bzip2-devel libffi-devel \
2322 && yum autoremove -y \
2423 && 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 \
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
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ USER root
44
55RUN 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
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ USER root
44
55RUN 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
Original file line number Diff line number Diff 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\i nterpreter_python = /usr/bin/python3' /opt/ansible/ansible.cfg
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
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\i nterpreter_python = /usr/bin/python3' ${SPLUNK_ANSIBLE_HOME}/ansible.cfg \
115116 && chmod 755 /sbin/entrypoint.sh /sbin/createdefaults.py /sbin/checkstate.sh
116117
117118USER ${ANSIBLE_USER}
You can’t perform that action at this time.
0 commit comments