1. 拉取镜像
docker pull ubuntu
2. 启动容器
docker run --name ubuntu -it -d -p 8088:80 ubuntu
3. 登入容器
docker exec -it ubuntu bash
# 使用Windows git bash winpty docker exec -it ubuntu bash
4. 更新资源
apt-get update apt-get upgrade
5. 设置root密码
passwd
6. 安装软件
apt-get install vim apt-get install openssh-server
7. 编辑配置文件:
#PermitRootLogin prohibit-password 默认是注释的 #添加配置 PermitRootLogin yes # 重启ssh /etc/init.d/ssh restart # 本机测试链接 ssh root@0.0.0.0



