install-docker一键安装 docker 二进制文件

联合创作 · 2023-09-27 14:15

install-docker 是一个一键安装 docker 二进制文件的脚本,支持从 Tuna、Aliyun 等镜像下载安装 docker 二进制文件,并同时支持 docker-compose 从国内镜像下载安装。

快速开始

curl -fsSL https://cdn.jsdelivr.net/gh/dyrnq/install-docker@main/install-docker.sh | bash -s docker --mirror Tuna --version 20.10.3 --with-compose --compose-version 1.28.2 --compose-mirror daocloud

获取

git clone --depth 1 https://github.com/dyrnq/install-docker.git 
curl -fsSL -O https://raw.githubusercontent.com/dyrnq/install-docker/main/install-docker.sh
chmod +x ./install-docker.sh

用法

  • –mirror
mirror linux(x86_64)
aliyun https://mirrors.aliyun.com/docker-ce/linux/static/stable/x86_64/
163 https://mirrors.163.com/docker-ce/linux/static/stable/x86_64/
tencent https://mirrors.tencent.com/docker-ce/linux/static/stable/x86_64/
huaweicloud https://mirrors.huaweicloud.com/docker-ce/linux/static/stable/x86_64/
tuna https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/static/stable/x86_64/
tsinghua https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/static/stable/x86_64/
ustc https://mirrors.ustc.edu.cn/docker-ce/linux/static/stable/x86_64/
sjtu https://mirror.sjtu.edu.cn/docker-ce/linux/static/stable/x86_64/
zju https://mirrors.zju.edu.cn/docker-ce/linux/static/stable/x86_64/
nju https://mirrors.nju.edu.cn/docker-ce/linux/static/stable/x86_64/
njupt https://mirrors.njupt.edu.cn/docker-ce/linux/static/stable/x86_64/
bfsu https://mirrors.bfsu.edu.cn/docker-ce/linux/static/stable/x86_64/
nwafu https://mirrors.nwafu.edu.cn/docker-ce/linux/static/stable/x86_64/
sustech https://mirrors.sustech.edu.cn/docker-ce/linux/static/stable/x86_64/
hit https://mirrors.hit.edu.cn/docker-ce/linux/static/stable/x86_64/
xtom https://mirrors.xtom.com.hk/docker-ce/linux/static/stable/x86_64/
  • –with-compose
./install-docker.sh --mirror Tuna --version 20.10.3 --prefix /usr/local/bin --with-compose --compose-version 1.28.2 --compose-mirror daocloud --compose-prefix /usr/local/bin

命令行选项

Name Description Default
–mirror mirror of docker binary download url  
–prefix docker binary installation directory /usr/local/bin
–version docker binary version 20.10.2
–with-compose install docker-compose  
–compose-prefix docker-compose installation directory /usr/local/bin
–compose-version docker-compose version 1.28.2
–compose-mirror mirror of docker-compose download url  
–systemd-mirror mirror of dockerd`s systemd unit files jsdelivr
–no-systemd do not install dockerd`s systemd unit files  
–daemon-json daemon.json path or url  
–no-daemon-json do not install daemon.json  
–daemon-json-prefix daemon.json path /etc/docker
–dry-run dry run  

Tks

浏览 7
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报