一、查看系统内核
uname -r
3.10.0-229.el7.x86_64
二、Install Docker
1、Install with yum
sudo yum update
2、vi /etc/yum.repos.d/docker.repo
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
vi /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
3、安装docker
sudo yum install docker-engine
4、设置开机自启服务
sudo systemctl enable docker.service
5、启服务
sudo systemctl start docker
6、验证是否正确安装,通过运行一个测试图像在一个容器中。
$ sudo docker run --rm 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: 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 Hub account: https://hub.docker.com For more examples and ideas, visit: https://docs.docker.com/engine/userguide/
三、Uninstall docker
1、查询安装的docker版本
$ yum list installed | grep docker
docker-engine.x86_64 1.7.1-0.1.el7@/docker-engine-1.7.1-0.1.el7.x86_64
2、卸载
$ sudo yum -y remove docker-engine.x86_64
3、删除所有图片、容器和卷,运行以下命令:
$ rm -rf /var/lib/docker
http://blog.csdn.net/a527219336/article/details/50800181
相关推荐
cento8.3安装docker
CentO11S5 nfs安装与配置总结.docx
CentO11S5 nfs安装与配置总结.pdf
CentO11S5.6下安装SVN服务器+WINDOWS7下安装客户端.docx
CentO11S5.6下安装SVN服务器+WINDOWS7下安装客户端.pdf
在Linux环境中,特别是服务器系统,有时需要在没有网络的情况下安装软件。本教程将详细介绍如何在CentOS 7.2...理解并掌握这种安装方式,能够帮助你在各种场景下灵活应对,确保Docker能够在CentOS 7.2系统上正常运行。
然而,在这种情况下,问题被归因于GCC 3.3.2版本与系统的兼容性问题。系统版本是"Release 11.2.0.1.0 Production",可能是Oracle数据库的一个版本,而GCC版本需要与之匹配。因此,升级GCC到更高版本(如4.3.2、4.4.3...
CentO11S linux下安装和配置Apache+SVN(用浏览器http方式访问SVN目录).docx
CentO11S linux下安装和配置Apache+SVN(用浏览器http方式访问SVN目录).pdf
运行docker Linux内核版本需要在3.8以上,针对centos6.5 内核为2.6的系统需要先升级内核.不然会特别卡,退出容器. 在yum的ELRepo源中,有mainline(3.13.1)、long-term(3.10.28)这2个内核版本,考虑到long-term更...
CentO11S 8编译安装32位Wine.docx
CentO11S 8编译安装32位Wine.pdf
CentO11S 系统下YUM配置方法.docx
CentO11S 系统下YUM配置方法.pdf
#### 一、安装与配置VMware - **下载与安装**:首先从官方网站或可靠来源下载VMware软件。安装过程中按照提示完成即可,注意阅读每一步的说明来确保正确配置。 - **授权码获取**:如果遇到授权问题,可以在网上搜索...
CentO11S6.3系统Yum安装php+spawn-fcgi+nginx和数据库mysql详细教程.pdf
CentO11S6.3系统Yum安装php+spawn-fcgi+nginx和数据库mysql详细教程.docx
在安装 CentOS 过程中,需要选择安装设置,例如选择指定分区、文件系统的格式等。 7. 设置用户密码 在安装 CentOS 完成后,需要设置用户密码,以便于后续的登录。 8. 安装完成 安装完成后,需要重启虚拟机,以...
Centos7 上安装 Oracle 11g R2 需要经过多个步骤,包括环境准备、安装包准备、创建系统用户和用户组、安装目录创建、修改 OS 系统标识、关闭防火墙和 SELinux、修改内核参数、配置用户环境变量、解压安装包等。...
当前容器的发展,对Docker逐渐远离,拥抱Containerd和Podman,目前Podman操作基本与Docker一致,让用户从Docker迁移至Podman成为了可能。 由于CentOS7.9默认安装的都是Podman1.6.4,为了适应更好适应生产环境,需要...