一时兴起,搭建windows 下的docker。
1、下载了dockertoolsbox2、Gitbash 下运行,修改了start.sh里面的环境变量。(如果配置了就不需要手动修改了)3、下载镜像 4、gitbash 里面运行,docker images$ docker imagestime="2017-03-16T13:49:07+08:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"REPOSITORY TAG IMAGE ID CREATED SIZEhub.c.163.com/public/centos 6.7-tools b2ab0ed558bb 3 weeks ago 602 MBhub.c.163.com/public/centos latest 997f0ed97903 12 months ago 442 MBhub.c.163.com/public/ubuntu 16.04 70b70c987e8f 13 months ago 224 MB
5、进入centos 6.7-tools,
$ docker run -i -t hub.c.163.com/public/centos:6.7-tools bashtime="2017-03-16T13:50:41+08:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
报错,需要在命令前面加 winpty ,即: winpty docker run -i -t hub.c.163.com/public/centos:6.7-tools bash
()6、winpty docker run -i -t hub.c.163.com/public/centos:6.7-tools bash即进入centos。
查看linux 版本:
---1-- [root@9074c4ac74e0 /]# cat /proc/versionLinux version 4.4.52-boot2docker (root@ed11f485244a) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Wed Mar 1 23:41:46 UTC 2017---2-- [root@07412bb23ddd /]# lsb_release -aLSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarchDistributor ID: CentOSDescription: CentOS release 6.7 (Final)Release: 6.7Codename: Final---3-- [root@9074c4ac74e0 /]# cat /etc/issueCentOS release 6.7 (Final)Kernel r on an mso,centos已经在docker安装完毕。