CentOS7.9一键安装Docker20.10.14

Posted teamlet

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7.9一键安装Docker20.10.14相关的知识,希望对你有一定的参考价值。

#!/bin/bash

echo -e "\\n *** Installing docker for CentOS 7.9 (2009)...\\n"

yum versionlock clear

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

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

yum -y install yum-utils

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

yum makecache

yum -y install docker-ce docker-ce-cli containerd.io

echo -e "\\n *** Install Successful! \\n"

echo -e "\\n *** Configurating ... \\n"

systemctl start docker

systemctl enable docker

echo -e  "\\n *** Install and Config Done! \\n\\n"

以上是关于CentOS7.9一键安装Docker20.10.14的主要内容,如果未能解决你的问题,请参考以下文章

CentOS7.9一键安装Docker20.10.14

CentOS7.9一键安装Docker20.10.14

Centos7.9.2009安装Docker

笔记:CentOS7.9 安装 Docker 20

docker 启动centos7图形画界面并

Docker安装CentOS容器