一、更新yum源
yum update
二、安装依赖项
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel gcc make
三、yum源只有3.8.0版本,所以还是使用源码安装
cd Your_dir
wget https://cdn.npm.taobao.org/dist/python/3.8.5/Python-3.8.5.tgz
tar -zxvf Python-3.8.5.tgz
cd Python-3.8.5
mkdir /usr/local/python3.8.5
./configure --prefix=/usr/local/python385 --enable-optimizations;make;make install
ln -s /usr/local/python385/bin/python3 /usr/bin/python3
ln -s /usr/local/python385/bin/pip3 /usr/bin/pip3
四、安装runlike
pip3 install runlike
五、查看容器启动参数
runlike -p <容器名>|<容器ID>
runlike -p bind
docker run \
–name=bind \
–hostname=a788eba0353d \
–mac-address=02:42:ac:11:00:02 \
–env=WEBMIN_ENABLED=false \
–env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
–env=BIND_USER=bind \
–env=BIND_VERSION=9.16.1 \
–env=WEBMIN_VERSION=1.941 \
–env=DATA_DIR=/data \
–volume=/named:/data \
–expose=10000 \
–expose=53 \
-p 53:53/udp \
–restart=no \
–label=’maintainer=sameer@damagehead.com’ \
–detach=true \
sameersbn/bind:latest \
/usr/sbin/named