1.centos 7

在windows下通过vm虚拟机安装centos 7:

VMware-workstation-full-10.0.3-1895310

centos 7

2.要求

操作系统的内核版本不能低于3.10

查看内核版本:

# uname -r

3.安装

3.1通过yum安装

需要联入互联网

$ dudo yum update
3.1.2加入yum repo
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=
gpgcheck=
gpgkey=https://yum.dockerproject.org/gpg
EOF
3.1.3安装docker软件包
$ sudo yum install docker-engine
3.1.4启动docker守护进程
$ sudo service docker start
3.1.5验证docker是否安装成功,在容器里面运行一个官方的测试镜像(hello-world)
$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from hello-world
a8219747be10: Pull complete
91c95931e552: Already exists
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1..1cf5daeb82aab55838d
Status: Downloaded newer image for hello-world:latest
Hello from Docker.
This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps:
. The Docker client contacted the Docker daemon.
. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(Assuming it was not already locally available.)
. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
. 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 For more examples and ideas, visit:
http://docs.docker.com/userguide/

显示上面的结果则表示安装成功。

3.2用curl工具通过shell脚本安装

$ sudo yum update
3.2.1执行docker安装脚本
$ curl -fsSL https://get.docker.com/ | sh
3.2.2启动docker
$ sudo service docker start
3.2.3验证
$ sudo docker run hello-world

相关链接:

https://docs.docker.com/engine/installation/linux/centos/

centos 7安装部署docker的更多相关文章

  1. Linux系统如何在离线环境或内网环境安装部署Docker服务和其他服务

    如何在离线环境或纯内网环境的Linux机器上安装部署Docker服务或其他服务.本次我们以Docker服务和Ansible服务为例. 获取指定服务的所有rpm包 保证要获取rpm包的机器能够上网. 本 ...

  2. Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(二)

    Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(一) 接上一篇 3. Nginx配置反向代理 3.1 cnetos 安装nginx 首先,我们需要在服务器上安装N ...

  3. Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践(一)

    环境 本地 win7 服务器:Virtual Box 上的Centos ssh工具: Xshell 文件传输: xftp 1.在本地创建asp.net core应用发布 1.1 使用Vs2017 新建 ...

  4. [转]Centos 7 安装部署 GitLab 服务器

    Centos 7 安装部署 GitLab 服务器 转自:https://www.jianshu.com/p/79bfded68899 文前说明 作为码农中的一员,需要不断的学习,我工作之余将一些分析总 ...

  5. Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践

    原文:Asp.NetCore程序发布到CentOs(含安装部署netcore)--最佳实践 环境 本地 win7 服务器:Virtual Box 上的Centos ssh工具: Xshell 文件传输 ...

  6. 一、CentOS 7安装部署GitLab服务器

    一.CentOS 7安装部署GitLab服务器 1.安装依赖软件 yum -y install policycoreutils policycoreutils-python openssh-serve ...

  7. 【CentOS】安装部署jenkins从git获取代码[转]

    持续集成①安装部署jenkins从git获取代码 一:持续集成的概念: 1.1:总体的概括 持续集成Continuous Integration 持续交付Continuous Delivery 持续部 ...

  8. Centos上安装配置docker(命令集)

    导出镜像存储: docker save house/redis:3.2 > redis_img.tar   (也可以使用镜像ID) 导入镜像存储: docker load < redis_ ...

  9. CentOS 7安装部署ELK 6.2.4-SUCCESS

    一.ELK介绍 ELK是三款开源软件的缩写,即:ElasticSearch + Logstash + Kibana.这三个工具组合形成了一套实用.易用的监控架构,可抓取系统日志.apache日志.ng ...

随机推荐

  1. Java命名规则总结

    1. JAVA源文件的命名 JAVA源文件名必须和源文件中所定义的类的类名相同. 2. Package的命名 Package名的第一部分应是小写ASCII字符,并且是顶级域名之一,通常是com.edu ...

  2. c++11新的小猫腻

    1.void*指针的使用,平时见得也很多了,至于为什么使用void* 指针,很多人有自己的见解,反正普通指针轻轻松松的转向void * 指针,但是void*指针转向其他的指针都要采用强制转换的. 2. ...

  3. Mac下搭建php开发环境【转】

    Mac OS X 内置了Apache 和 PHP,这样使用起来非常方便.本文以Mac OS X 10.6.3为例.主要内容包括: 启动Apache 运行PHP 安装MySQL 使用phpMyAdmin ...

  4. MySQL知识树-查询语句

    在日常的web应用开发过程中,一般会涉及到数据库方面的操作,其中查询又是占绝大部分的.我们不仅要会写查询,最好能系统的学习下与查询相关的知识点,这篇随笔我们就来一起看看MySQL查询知识相关的树是什么 ...

  5. A Five-Minute Guide to Ph.D. Program Applications

    http://pgbovine.net/PhD-application-tips.htm

  6. c++ sort降序排序

    sort是c++ STL中提供的一个函数模板,可以用来对多种类型进行排序. 默认是升序排序.它有两种使用方法: default (1) template <class RandomAccessI ...

  7. WIN32服务程序(二):卸载服务

    卸载服务的过程是这样的,用OpenSCManager打开SCM,使用OpenService打开准备卸载的服务,通过QueryServiceStatus查询该服务的状态是否停止,如果否,则先停止该服务C ...

  8. 如何隐藏UITableView中的一项

    我最近工作中的一个iOS App中经常有在不同的场合,隐现菜单列表里某一项的需求.如果初始化的时候就去掉某一项的话,有可能让序号变化, 处理上会比较麻烦容易出错.我采用了初始化列表相同但是隐藏sect ...

  9. js写的5秒钟倒计时跳转

    使用js实现几秒以后倒计时跳转,这个在某些特殊情况下还是比较实用的,下面为大家介绍下具体的实现步骤,感兴趣的朋友不要错过  代码如下: <html>  <head>  < ...

  10. Tomcat调试笔记

    调试笔记 在使用Tomcat过程中经常碰到问题,导致tomcat启动失败.如下↓ 由于报错太过笼统,我根本无法找出错误.后来我切换到Console视图下,看到了如下错误信息. 根据报错信息,错误原因是 ...