在docker上运行一个centos7.9的系统
docker pull centos:centos7.9.2009
docker images
docker run -itd --name=centos --privileged=true -p 3333:22 centos:centos7.9.2009 /usr/sbin/init
docker ps
docker exec -it centos /bin/bash
yum install openssh* -y
systemctl restart sshd
systemctl status sshd
passwd root
exit
外部连接ip:3333即可