docker 的安装

作者: 慢慢来了 | 来源:发表于2017-08-30 15:32 被阅读45次

    docker 的安装记录说明 ,应用于OS 7.0以下安装与验证
    查看系统版本
    $ cat /proc/issue
    CentOS release 6.9 (Final)

    1 docker安装 并看到响应:

    $ yum -y install docker-io
    Installing : lxc-libs-1.0.10-2.el6.x86_64 1/7
    Installing : lua-filesystem-1.4.2-1.el6.x86_64 2/7
    Installing : lua-lxc-1.0.10-2.el6.x86_64 3/7
    Installing : libcgroup-0.40.rc1-23.el6.x86_64 4/7
    Installing : lua-alt-getopt-0.7.0-1.el6.noarch 5/7
    Installing : lxc-1.0.10-2.el6.x86_64 6/7
    Installing : docker-io-1.7.1-2.el6.x86_64 7/7
    Verifying : lua-lxc-1.0.10-2.el6.x86_64 1/7
    Verifying : lxc-libs-1.0.10-2.el6.x86_64 2/7
    Verifying : lxc-1.0.10-2.el6.x86_64 3/7
    Verifying : docker-io-1.7.1-2.el6.x86_64 4/7
    Verifying : lua-alt-getopt-0.7.0-1.el6.noarch 5/7
    Verifying : libcgroup-0.40.rc1-23.el6.x86_64 6/7
    Verifying : lua-filesystem-1.4.2-1.el6.x86_64 7/7
    Installed:
    docker-io.x86_64 0:1.7.1-2.el6
    Dependency Installed:
    libcgroup.x86_64 0:0.40.rc1-23.el6 lua-alt-getopt.noarch 0:0.7.0-1.el6 lua-filesystem.x86_64 0:1.4.2-1.el6 lua-lxc.x86_64 0:1.0.10-2.el6 lxc.x86_64 0:1.0.10-2.el6 lxc-libs.x86_64 0:1.0.10-2.el6

    2 docker 服务启动 并响应:

    $ service docker start
    Starting cgconfig service: [ OK ]
    Starting docker: [ OK ]

    3 docker 安装验证,运行 hello-world 响应:

    $ docker run hello-world
    Hello from Docker!
    This message shows that your installation appears to be working correctly.
    To generate this message, Docker took the following steps:

    1. The Docker client contacted the Docker daemon.
    2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    3. The Docker daemon created a new container from that image which runs the
      executable that produces the output you are currently reading.
    4. The Docker daemon streamed that output to the Docker client, which sent it
      to your terminal.
      To try something more ambitious, you can run an Ubuntu container with:
      $ docker run -it ubuntu bash
      Share images, automate workflows, and more with a free Docker ID:
      https://cloud.docker.com/
      For more examples and ideas, visit:
      https://docs.docker.com/engine/userguide/
    4 docker 版本查看:

    $ docker version
    Client version: 1.7.1
    Client API version: 1.19
    Go version (client): go1.4.2
    Git commit (client): 786b29d/1.7.1
    OS/Arch (client): linux/amd64
    Server version: 1.7.1
    Server API version: 1.19
    Go version (server): go1.4.2
    Git commit (server): 786b29d/1.7.1
    OS/Arch (server): linux/amd64

    5 docker 信息查看:

    $ docker info
    Containers: 4
    Images: 3
    Storage Driver: devicemapper
    Pool Name: docker-252:1-919642-pool
    Pool Blocksize: 65.54 kB
    Backing Filesystem: extfs
    Data file: /dev/loop0
    Metadata file: /dev/loop1
    Data Space Used: 468.1 MB
    Data Space Total: 107.4 GB
    Data Space Available: 106.9 GB
    Metadata Space Used: 1.081 MB
    Metadata Space Total: 2.147 GB
    Metadata Space Available: 2.146 GB
    Udev Sync Supported: true
    Deferred Removal Enabled: false
    Data loop file: /var/lib/docker/devicemapper/devicemapper/data
    Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
    Library Version: 1.02.117-RHEL6 (2016-12-13)
    Execution Driver: native-0.2
    Logging Driver: json-file
    Kernel Version: 2.6.32-573.22.1.el6.x86_64
    Operating System: <unknown>
    CPUs: 4
    Total Memory: 7.688 GiB
    Name: xxxxxxx
    ID: xxxxx

    参考:
    https://docs.docker.com/engine/installation/linux/docker-ce/centos/#prerequisites

    相关文章

      网友评论

        本文标题:docker 的安装

        本文链接:https://www.haomeiwen.com/subject/jjutjxtx.html