Linux中docker容器的安装
1.查看当前内核版本>=3.10
uname -r
2.更新yum包
yum update
3.卸载旧版本
yum remove docker docker-common docker-selinux docker-engine
4.安装依赖包
yum install -y yum-utils device-mapper-persistent-data lvm2
5.设置yum源
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
6.运行yum makecache生成缓存
yum clean all
yum makecache
7.安装docker
yum install docker-ce
8.启动docker并加入开机自启
systemctl start docker
systemctl enable docker
9.验证是否成功
docker version
配置镜像加速器
vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
刷新daemon并重启docker
systemctl daemon-reload
systemctl restart docker
相关推荐
王道革 2020-11-25
bwyyziq 2020-11-22
pigsmall 2020-11-19
changecan 2020-11-19
helloWorldAndYou 2020-11-16
nginxs 2020-11-14
红石丶 2020-11-13
WanKaShing 2020-11-12
yangkang 2020-11-12
滴水穿石点石成金 2020-11-12
张荣珍 2020-11-12
wuxunanjing 2020-11-11
魅惑青花瓷 2020-11-11
lihongtai 2020-11-09
yangkang 2020-11-09
worldsnow 2020-11-06
MichaelJScofield 2020-11-06
TaoTaoFu 2020-11-06