一键安装 docker 及 docker compose
一键查询 docker 最新版本并安装(解压安装到 /usr/bin 目录下)
curl -s https://files-cdn.cnblogs.com/files/nihaorz/install_docker.sh | bash
执行结果如下:
[root@vm-centos7 ~]# curl -s https://files-cdn.cnblogs.com/files/nihaorz/install_docker.sh | bash 查询 docker 最新版本 当前最新版本:23.0.6 即将下载并安装:http://mirrors.ustc.edu.cn/docker-ce/linux/static/stable/x86_64/docker-23.0.6.tgz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 63.8M 100 63.8M 0 0 53.6M 0 0:00:01 0:00:01 --:--:-- 53.6M docker/ docker/docker-proxy docker/containerd-shim-runc-v2 docker/ctr docker/docker docker/docker-init docker/runc docker/dockerd docker/containerd Docker version 23.0.6, build 9dbdbd4 24957
一键安装 docker compose
curl -s https://files-cdn.cnblogs.com/files/nihaorz/install_docker_compose.sh | bash
执行结果如下:
[root@vm-centos7 ~]# curl -s https://files-cdn.cnblogs.com/files/nihaorz/install_docker_compose.sh | bash 查询 compose 最新版本 当前最新版本:v2.17.3 即将下载并安装 https://ghproxy.com/https://github.com/docker/compose/releases/download/v2.17.3/docker-compose-linux-x86_64 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 51.9M 100 51.9M 0 0 15.4M 0 0:00:03 0:00:03 --:--:-- 15.4M Docker Compose version v2.17.3