您的位置:首页 > 运维架构 > Docker

DOCKER 的安装和卸载

2017-04-21 13:04 323 查看
前提条件Docker 需要使用Linux 中内核的CGrups 和Namespace 功能,因此必须使用包含这两项功能的Linux 内核,所以内核必须是高于3.10 的64 位系统,可以通过uname -r 查看当前的内核版本。root@ghostcloud:~# uname -r3.13.0-65-genericUbuntu 上面安装Apt 是Ubuntu 默认的包管理系统,apt 在安装的时候会根据你的apt 配置文件去搜索安装源。一同样以root 用户登录系统,1. 安装root@ghostcloud:~# apt-get install docker-engine2. 启动docker daemonroot@ghostcloud:~# service docker start3. 测试安装是否成功root@ghostcloud:~# docker versionCENTOS 上面的安装yuminstall docker安装的不是最新的版本,要安装最新的,可参考文档:https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7 简单的步骤如下But first, let's update the package database:
sudo yumcheck-updateNow run this command. It will add the official Docker repository, download the latest version of Docker, and install it:
curl -fsSL https://get.docker.com/ | shAfter installation has completed, start the Docker daemon:
sudo systemctl start dockerVerify that it's running:
sudo systemctl status docker

卸载

列出你安装过的包

$ yum
list
installed
|
grep docker
yum
list
installed
|
grep docker
docker
-engine.
x86_64  
1.7.1-1.
el7 @/docker
-engine-1.7.1-1.
el7
.
x86_64
.
rpm

删除安装包

$ sudo yum
-y
remove docker
-engine.
x86_64

删除镜像/容器等

$ rm
-rf
/
var
/lib/docker
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  DOCKER