Registrati Accedi
n/program · 2024-12-05 · 409 visualizzazioni
u/xybinArgento
n/programu/xybin · 2024-12-05

最新docker安装方式 懒人方法

# 安装docker

## 更改CentOs Yum源

~~shell</s><i> </i>rm -rf /etc/yum.repos.d/* wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo 或 curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo<i> </i><e>

## 一键安装docker脚本

```
bash <(curl -sSL https://linuxmirrors.cn/docker.sh)
```

~~

## 安装完成

```shell
+-----------------------------------+
| ⡇ ⠄ ⣀⡀ ⡀⢀ ⡀⢀ ⡷⢾ ⠄ ⡀⣀ ⡀⣀ ⢀⡀ ⡀⣀ ⢀⣀ |
| ⠧⠤ ⠇ ⠇⠸ ⠣⠼ ⠜⠣ ⠇⠸ ⠇ ⠏ ⠏ ⠣⠜ ⠏ ⠭⠕ |
+-----------------------------------+
欢迎使用 Docker Engine 安装与换源脚本

运行环境 CentOS Linux 7 (Core) x86_64
系统时间 2024-12-04 14:41 Asia/Shanghai

└─ 是否安装最新版本的 Docker Engine? [Y/n] y

❖ 阿里云 1)
❖ 腾讯云 2)
❖ 华为云 3)
❖ 微软 Azure 中国 4)
❖ 网易 5)
❖ 火山引擎 6)
❖ 清华大学 7)
❖ 北京大学 8)
❖ 南京大学 9)
❖ 上海交通大学 10)
❖ 中国科学技术大学 11)
❖ 中国科学院软件研究所 12)
❖ 官方 13)

└─ 请选择并输入你想使用的 Docker CE 源 [ 1-13 ]:2

❖ Docker Proxy(推荐) 1)
❖ 道客 DaoCloud 2)
❖ AtomHub 可信镜像中心 3)
❖ 阿里云(杭州) 4)
❖ 阿里云(上海) 5)
❖ 阿里云(青岛) 6)
❖ 阿里云(北京) 7)
❖ 阿里云(张家口) 8)
❖ 阿里云(呼和浩特) 9)
❖ 阿里云(乌兰察布) 10)
❖ 阿里云(深圳) 11)
❖ 阿里云(河源) 12)
❖ 阿里云(广州) 13)
❖ 阿里云(成都) 14)
❖ 阿里云(香港) 15)
❖ 阿里云(日本-东京) 16)
❖ 阿里云(新加坡) 17)
❖ 阿里云(澳大利亚-悉尼) 18)
❖ 阿里云(马来西亚-吉隆坡) 19)
❖ 阿里云(印度尼西亚-雅加达) 20)
❖ 阿里云(印度-孟买) 21)
❖ 阿里云(德国-法兰克福) 22)
❖ 阿里云(英国-伦敦) 23)
❖ 阿里云(美国西部-硅谷) 24)
❖ 阿里云(美国东部-弗吉尼亚) 25)
❖ 阿里云(阿联酋-迪拜) 26)
❖ 腾讯云 27)
❖ 谷歌云 28)
❖ 官方 Docker Hub 29)

└─ 请选择并输入你想使用的 Docker Registry 源 [ 1-29 ]:27

[ >_ ] 开始生成软件源缓存...

[完成] 已备份原有 Docker 配置文件至 /etc/docker/daemon.json.bak

当前安装版本:Docker version 26.1.4, build 5650f9b

[完成] 安装完成

---------- 脚本执行结束 ----------

```

~~

0
4
Accedi per partecipare alla discussione.

4 risposte

Ordinamento
  1. Zachariah Oro 2024-12-05

    好东西

    0
  2. mir_xiong Oro 3 ANNI 2024-12-05

    可以 不错的脚本

    0
  3. kefeng Oro 2024-12-05

    CentOs 没有 debian ubuntu用的多

    0
  4. xybin Argento OP 2024-12-05

    @"kf"#p173183 脚本里是都有的~~

    0