侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

Docker使用系列三:CentOS 6.5 快速体验Ubuntu 14.04 可以ssh 登陆

2022-07-04 星期一 / 0 评论 / 0 点赞 / 45 阅读 / 1528 字

所有操作都是用root账号在CentOS 6.5上完成,假设没有安装docker 依次使用root执行后面的命令就可以了 curl https://git.oschina.net/feed

所有操作都是用root账号在CentOS 6.5上完成,假设没有安装docker

依次使用root执行后面的命令就可以了


curl https://git.oschina.net/feedao/Docker_shell/raw/start/ali-centos.sh | shyum -y install docker-io service docker startyum -y install debootstrapdebootstrap --arch amd64 --include=vim,openssh-server,openssh-client trusty ubuntu-trusty http://mirrors.aliyun.com/ubuntu/cd ubuntu-trusty && tar -c .|docker import - ubuntu1404-basedocker build -t ubuntu1404-ssh https://git.oschina.net/feedao/Docker_shell/raw/start/trustyDockerfiledocker run -d -p 127.0.0.1:33303:22 ubuntu1404-ssh

前面完成后,登陆容器:

ssh [email protected] -p 33303

输入密码:123456

效果如下:

[root@localhost lists]# ssh [email protected] -p [email protected]'s password: Welcome to Ubuntu 14.04 LTS (GNU/Linux 2.6.32-431.11.2.el6.x86_64 x86_64) * Documentation:  https://help.ubuntu.com/Last login: Fri Apr 18 08:14:45 2014 from 172.17.42.1root@0b26318a0d63:~# cat /etc/issueUbuntu 14.04 LTS /n /lroot@0b26318a0d63:~# uname -aLinux 0b26318a0d63 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux



从上面可以看出,内核还是使用的CentOS的,只是版本和软件编程了ubuntu 14.04

这好像是个问题


广告 广告

评论区