CentOS 是 RHEL(Red Hat Enterprise Linux)源代码再编译的产物,而且在 RHEL 的基础上修正了不少已知的 Bug ,相对于其他 Linux 发行版,其稳定性值得信赖。
docker run -itd --name centos-test -p 20001:22 --privileged centos:centos7.9.2009 /usr/sbin/init
yum install net-tools.x86_64 -y
yum install -y openssh-server
systemctl restart sshd
yum install passwd -y
passwd root
yum install -y yum-utils
yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
yum list docker-ce --showduplicates | sort -r
systemctl start docker
systemctl enable docker