1. 安装需求

  • 内核版本3.10以上
  • Centos 7以上
  • 64位版本

2. 使用root登录或者具有sudo权限

3. 确保系统是最新的

 yum update

4. 添加yum源

tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=
gpgcheck=
gpgkey=https://yum.dockerproject.org/gpg
EOF

5. 安装docker包

yum install docker-engine

6. 开启docker服务

service docker start

7. 验证安装

docker run hello-world

输出如下

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pull complete
Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
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.
. 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 Share images, automate workflows, and more with a free Docker Hub account:
https://hub.docker.com For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

8. 创建docker组(可选)

docker命令必须root权限执行,但docker用户组默认拥有这个权限

groupadd docker
usermod -aG docker your_username

docker组的用户默认可执行docker命令,无需root权限

9. 启动时运行docker服务(可选)

chkconfig docker on

10. 卸载docker

查看安装docker包

$ yum list installed | grep docker
docker-engine.x86_64 1.11.-.el7.centos @dockerrepo
docker-engine-selinux.noarch 1.11.-.el7.centos @dockerrepo

删除安装的包

yum -y remove docker-engine.x86_64

这一步并未删除数据,要想删除镜像、容器和磁盘卷,执行如下命令

rm -rf /var/lib/docker

基于centos的docker安装的更多相关文章

  1. CentOS下Docker安装

    CentOS下Docker安装 1.安装: #sudo yum install docker 2.启动并加入开机启动: A.#sudo systemctl start docker B.#sudo s ...

  2. CentOS环境Docker安装教程(官方推荐的docker三种方式安装)

    CentOS环境Docker安装教程(官方推荐的docker三种方式安装) 一.使用yum方式安装 1.安装依赖包 $ sudo yum install -y yum-utils device-map ...

  3. CentOS 使用 Docker 安装 Sentry

    官网介绍:Sentry是一个实时事件日志记录和汇集的日志平台,其专注于错误监控,以及提取一切事后处理所需的信息.他基于Django开发,目的在于帮助开发人员从散落在多个不同服务器上的日志文件里提取发掘 ...

  4. Centos 7 Docker安装配置

    版本介绍 Docker从1.13版本之后采用时间线的方式作为版本号,分为社区版CE和企业版EE.社区版是免费提供给个人开发者和小型团体使用的,企业版会提供额外的收费服务,比如经过官方测试认证过的基础设 ...

  5. CentOS 7 Docker 安装

    CentOS Docker 安装 Docker支持以下的CentOS版本: CentOS 7 (64-bit) CentOS 6.5 (64-bit) 或更高的版本 本文以 CentOS 7.6 版本 ...

  6. CentOS 7 Docker安装部署Go Web

    Docker 是一种容器技术,它部署简单,能很好的进行服务隔离,生成镜像,Push到镜像仓库,其他机器一键拉取部署. Docker分为社区版CE和企业版EE,社区版是免费提供给个人和小型团队使用,企业 ...

  7. vagrant + virtualbox安装centos环境+docker安装

    1. 下载vagrant 并安装,安装完成后,输入vagrant回车查看是否安装成功 2. 下载virtualbox.box并安装,安装完成后. 3. 创建虚拟机文件夹,例如.F:/vmimg/fir ...

  8. 基于ubuntu的docker安装

    系统版本:Ubuntu16.04 docker版本:18.02.0 Ubuntu 系统的内核版本>3.10(执行 uname -r 可查看内核版本)   在安装前先简单介绍一下docker,按照 ...

  9. 基于Centos搭建Maven 安装与使用

    CentOS 7.2 64 位操作系统 安装 Maven Maven 简介 Apache Maven 是一个软件项目管理及自动构建工具,由 Apache 软件基金会所提供.基于项目对象模型(缩写:PO ...

随机推荐

  1. 端口状态说明 LISTENING、ESTABLISHED、TIME_WAIT及CLOSE_WAIT

    TCP状态转移要点    TCP协议规定,对于已经建立的连接,网络双方要进行四次握手才能成功断开连接,如果缺少了其中某个步骤,将会使连接处于假死状态,连接本身占用的资源不会被释放.网络服务器程序要同时 ...

  2. Java-线程池专题(什么是线程池,如何使用,为什么要用)

    1.什么是线程池:  java.util.concurrent.Executors提供了一个 java.util.concurrent.Executor接口的实现用于创建线程池 多线程技术主要解决处理 ...

  3. $ 一步一步学Matlab(2)——Matlab基本通用操作

    在上一篇中对Matlab做了一个初步的了解,本文继续来零距离亲身体验Matlab,来感受一下Matlab的一些基本.通用的操作. 命令行窗口 一打开Matlab就能看到命令行窗口,在我所用的这个精简版 ...

  4. TortoiseSVN_1.9.1.267_x64版本控制系统(针对Visual SVN Server)使用简单介绍

    软件下载地址:TortoiseSVN(SVN客户端)64位 V1.9.1.267简体中文免费版 软件详细操作说明:TortoiseSVN使用说明书(超详细) 文章内容:此篇是简单记录如何从Visual ...

  5. 3.1、Ubuntu系统中jmeter的安装和目录解析

    ​以下内容亲测,如果不对的地方,欢迎留言指正,不甚感激.^_^祝工作愉快^_^ Jmeter是一个非常好用的压力测试工具.  Jmeter用来做轻量级的压力测试,非常合适,只需要十几分钟,就能把压力测 ...

  6. Linux数据备份与恢复

    Linux数据备份及服务器重要数据类别分析 对 Linux 服务器来讲,当然最理想的就是把整块硬盘中的数据都备份,甚至连分区和文件系统都备份,这样如果硬盘损坏,那么我们可以直接把备份硬盘中的数据导入损 ...

  7. Java读者写者问题

    实验存档. 允许好几个人同时读,但是不允许在有人读的时候写,以及同一时间只能有一个人在写. 读者.java: package operating.entity.readerwriter; import ...

  8. minSdk(API 21) > deviceSdk(API 17)解决

    运行一个开源的项目出现“minSdk(API 21) > deviceSdk(API 17)”的提示,因为我用的是手机是sdk(API17)的,而项目要求是最低版本是minSdk(API 21) ...

  9. intellij 文件太大,无法code assistant

    添加 idea.max.intellisense.filesize=2500 在IDE_HOME\bin\idea.properties https://intellij-support.jetbra ...

  10. 统计tophat map上的read数量

    samtools flagstat /SRA111111/SRR111222/accepted_hits.bam 78406056 + 0 in total (QC-passed reads + QC ...