安装docker for windows请参考

http://www.runoob.com/docker/windows-docker-install.html

下载完后启动kitematic,点击左下角DOCKER CLI

docker for windows 安装centos7.4 并且ssh访问

1、在窗口输入命令,创建image

docker run -d -p 5000:22 --name centos74 --privileged=true centos:latest /usr/sbin/init

2、进入容器命令
docker exec -it centos74 /bin/bash

docker for windows 安装centos7.4 并且ssh访问

3、service安装
yum install initscripts  

4、ifconfig安装
yum install net-tools.x86_64

5、ssh安装

yum install openssh-server 
service sshd restart
查看是否启动22端口 netstat -antp | grep sshd
修改vi /etc/ssh/sshd_config 修改成密码登录 端口22

6、修改root密码

passwd

输入两次密码

docker for windows 安装centos7.4 并且ssh访问

7、完成,可以打开ssh工具输入账号root 密码xxxxxxxx 就可以登录上去了

相关文章:

  • 2021-09-15
  • 2021-11-01
  • 2021-08-23
  • 2021-05-17
  • 2021-12-11
  • 2021-12-13
  • 2022-02-01
猜你喜欢
  • 2022-02-26
  • 2022-02-05
  • 2021-07-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
相关资源
相似解决方案