docker安装-卸载
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、验证是否正确安装,通过运行一个测试图像在一个容器中。
$ 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:
. 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/
三、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
docker安装-卸载的更多相关文章
- docker安装,卸载和入门
Docker 简介 背景 开发和运维之间因为环境不同而导致的矛盾 集群环境下每台机器部署相同的应用 DevOps(Development and Operations) 简介 Docker是一个开源的 ...
- [云原生]Docker - 安装&卸载
目录 系统要求 卸载旧版本 安装Docker 方法一:通过repo安装 设置Repository 安装Docker Engine 升级Docker Engine 方法二:通过package安装 方法三 ...
- Docker 安装&卸载
不同版本可能有差异具体信息查看官网 官网:https://docs.docker.com/engine/install/centos/ #环境准备 #查看环境 uname -r # 系统内核在3.10 ...
- 【环境安装】Docker安装
[环境安装]Docker安装 CentoOS-7 安装步骤: 1.卸载已经安装的Docker sudo yum remove docker \ docker-client \ docker-clien ...
- Docker安装和卸载
一:卸载旧版本 老版本的Docker被称为docker或docker-engine.如果安装了这些,请卸载它们以及相关的依赖项. $ sudo yum remove docker \ docker-c ...
- docker安装与卸载
文章转自:https://www.cnblogs.com/yufeng218/p/8370670.html (EE安装) https://blog.csdn.net/jxyzh11/article/ ...
- Docker入门(二):安装/卸载
这个<Docker入门系列>文档,是根据Docker官网(https://docs.docker.com)的帮助文档大致翻译而成.主要是作为个人学习记录.有错误的地方,Robin欢迎大家指 ...
- docker 安装 运行 卸载
一.卸载docker 安装时使用什么工具安装的docker就用什么工具卸载docker: 1.yum卸载docker 查看已安装的docker yum list installed | grep do ...
- docker安装及卸载
docker基本组成 镜像(image): docker镜像好比一个模板,可以通过这个模板创建容器服务,例如:tomcat镜像===>run===>tomcat01容器(提供服务器) 通过 ...
随机推荐
- cms完整视频教程+源码 孔浩老师 全131讲
话不多说,请看如下链接, 项目在此文件夹目录下: JAVA专区>3.深入Java Web>3.1.cms项目 很多反馈说无效 本次 2016.09.12 发布最新链接 链接:https ...
- iOS 合并.a文件,制作通用静态库
lipo -create SQY/iOS/iphoneos/libGamePlusAPI.a SQY/iOS/iphonesimulator/libGamePlusAPI.a - output ...
- 【转】利用shell命令操作Memcached
原文: 张宴的博客 —— http://zyan.cc/post/384/ -------------------------------------------------------------- ...
- android_checkbox_dialog 设计 是不是要开起 默认不提示对话框
android_checkbox_dialog设计是不是开起默认不提示 package com.example.android_checkbox_dialog; import android.app. ...
- bzoj 1030: [JSOI2007]文本生成器 (ac自己主动机上的dp)
1030: [JSOI2007]文本生成器 Time Limit: 1 Sec Memory Limit: 162 MB Submit: 2635 Solved: 1090 [id=1030&qu ...
- 线程相关函数(POSIX线程):
创建单个线程 #include <pthread.h> // 若成功返回0,出错返回正的Exxx值 int pthread_create(pthread_t *tid, // 每个线程在进 ...
- tabhost实现android菜单切换
做APP项目已经有半个月了.慢慢地熟悉了这个开发环境和开发套路. 虽然是摸着石头过河.但也渐渐看到了水的深度! 作为一个电商项目APP,势必会涉及究竟部菜单条的功能.自己实现这个功能的过程是崎岖的,最 ...
- C++结构体中使用函数与类中使用函数小结
#include <iostream>#include <string.h>using namespace std;struct stud//学生信息结构体{ char ...
- label 对齐
<label for="username">用户名</label> <input type="text" id="use ...
- 如何在外部采用AES-128对HLS的TS流进行加密
http://www.wowza.cn/hls/howToSecureHlsByAes128External