centenos安装oracle12,Cento系统下docker的安装与卸载

一、查看系统内核

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、验证是否正确安装,通过运行一个测试图像在一个容器中。

57f1bc46fd6208cab4185af9b40f3d63.gif

$ sudo docker run --rm hello-world

Unable tofind image 'hello-world:latest'locally

latest: Pulling from library/hello-world

c04b14da8d14: Pull complete

Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9

Status: Downloaded newer imagefor 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 whichruns the

executable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, whichsent it

to your terminal.

To try somethingmoreambitious, you can run an Ubuntu container with:

$ docker run-it ubuntu bash

Share images, automate workflows, andmore with a freeDocker Hub account:

https://hub.docker.com

Formoreexamples and ideas, visit:

https://docs.docker.com/engine/userguide/

57f1bc46fd6208cab4185af9b40f3d63.gif

三、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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值