docker toolbox

因后面会将操作系统从CentOS6.4升级到CentOS7,先试用下CentOS7。

  1. 启动容器服务
    systemctl start  docker.service
  2. 下载CentOS7 镜像
     
    1. [root@wxtest1607 ~]# docker pull centos:7.2.1511

    2. [root@wxtest1607 lixr]# docker images

    3. REPOSITORY TAG IMAGE ID CREATED SIZE

    4. centos 7.2.1511 686672a1d0cc 7 weeks ago 194.6 MB

    下载来源:https://hub.docker.com/
  3. 登录docker中的CentOS7
     
    1. docker run -ti 6866 /bin/bash

    2. #6866 是 IMAGE ID 前四位数字-能区分出是哪个image即可

    3. root@b4ad1d1c87da /]#

    4. #登录成功,接下来就可以为所欲为啦。

  4. 检查CentOS7系统
     
    1. root@b4ad1d1c87da /]# uname -a

    2. Linux b4ad1d1c87da 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

    3. [root@b4ad1d1c87da /]# cat /etc/redhat-release

    4. CentOS Linux release 7.2.1511 (Core)

  5. 退出后 再进入CentOS7
     
    1. [root@wxtest1607 ~]# docker ps -a

    2. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

    3. b4ad1d1c87da 6866 "/bin/bash" 12 seconds ago Up 9 seconds mad_swanson

    4. drunk_hypatia

    5. [root@wxtest1607 ~]# docker exec -ti b4ad /bin/bash

    6. [root@b4ad1d1c87da /]#

你可能感兴趣的:(docker toolbox)