最新消息:走过的,离开的,已经错过,新开始2016

果果.it 笔记-docker安装

技术随笔 果果 2298浏览 0评论

docker入门,今天我们讲讲安装。

果果系统是centos7,后面的操作都是这个系统下面进行。

安装必要的工具,如果已经安装跳过。

yum install -y wget

 

安装阿里云yum源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache

非阿里云网络主机再执行下面命令

sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo

安装一些docker的必要组件。

yum install -y yum-utils device-mapper-persistent-data lvm2

添加阿里云docker源

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

更新 yum 缓存

yum makecache fast

安装最新版docker

yum -y install docker-ce

如果要安装指定版本

yum list docker-ce --showduplicates | sort -r

如果要查看table版本

yum-config-manager --enable docker-ce-edge
yum-config-manager --enable docker-ce-test

安装指定版本的

yum install -y docker-ce-17.03.2.ce-1.el7.centos 

启动docker

systemctl docker.service

设置为开机启动

systemctl enable docker.service

查看docker版本

docker version

转载请注明:果果.IT » 果果.it 笔记-docker安装

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址