Docker安装
- docker 一键安装
sudo curl -sSL https://get.daocloud.io/docker | sh
- docker-compose 编排工具安装
sudo curl -L https://ghproxy.com/https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- 同步docker容器时区和时间
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
- docker 相关命令
systemctl enable docker # 开启开机自启动
systemctl start docker #启动docker
systemctl stop docker 停止docker
systemctl restart docker # 重启docker
service docker start
service docker stop
service docker restart
安装docker(官方)
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
安装docker-compose(官方)
curl -SL https://ghproxy.com/https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-linux-x86_64 -o usr/local/bin/docker-compose
开源一键安装脚本支持多个源安装
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
评论区