centos7 docker安装

来源:互联网 发布:java架构师 在线课 编辑:程序博客网 时间:2024/06/05 00:22

说明
系统:CentOS7.3
内核:3.10

[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@localhost ~]# uname -r3.10.0-514.el7.x86_64

1.下载

[root@localhost ~]# curl -O -sSL https://get.docker.com/rpm/1.7.0/centos-6/RPMS/x86_64/docker-engine-1.7.0-1.el6.x86_64.rpm[root@localhost ~]# lsanaconda-ks.cfg                       kibana-5.3.1-linux-x86_64.tar.gzdocker-engine-1.7.0-1.el6.x86_64.rpm  nginx-1.8.1elasticsearch-5.3.1.zip               nginx-1.8.1.tar.gzinitial-setup-ks.cfg                  packetbeat-5.3.1-linux-x86_64.tar.gz

2.安装

[root@localhost ~]# yum localinstall --nogpgcheck docker-engine-1.7.0-1.el6.x86_64.rpm[root@localhost ~]# docker -vDocker version 1.7.0, build 0baf609

3.启动

[root@localhost ~]#  service docker startStarting docker (via systemctl):                           [  OK  ][root@localhost ~]#  service docker status● docker.service - LSB: start and stop docker   Loaded: loaded (/etc/rc.d/init.d/docker; bad; vendor preset: disabled)   Active: active (running) since Sun 2017-05-21 13:43:58 CST; 10s ago......

4.通过在容器中运行docker镜像来验证docker是否正确安装

[root@localhost ~]# docker run hello-worldUnable to find image 'hello-world:latest' locallylatest: Pulling from hello-world50a54e1f9180: Pull complete 7a5a2d73abce: Pull complete ......

参考链接:https://docs.docker.com/v1.7/docker/installation/centos/

原创粉丝点击