docker -安装Python 脚本

#! /bin/bashcd /tmpecho "current direction is $(pwd)"yum -y install wgetwget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgztar -zxvf Python-3.6.6.tgz##python dependencyyum install -y gcc patch libffi-devel python-devel  zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-develyum -y install gcc automake autoconf libtool makeyum -y install gcc gcc-c++echo "current direction is $(pwd)"if [ -d /tmp/Python-3.6.6 ];then    echo "tar success .start make";    cd Python-3.6.6;    ./configure --prefix=/tmp/python36;    make;    make install;    cd /tmp/python36    echo "python make end ,start env"    dir=$(pwd)    echo ‘PATH=$PATH:‘$dir/bin >> /etc/profile    source /etc/profile    echo "current PATH =$PATH"    mv /usr/bin/python /usr/bin/python_bak    ln -s $dir/bin/python3 /usr/bin/pythonfi