侧边栏壁纸
博主头像
阿波兹博主等级

行动起来,活在当下

  • 累计撰写 46 篇文章
  • 累计创建 12 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Docker 快速安装

Aquiver
2023-04-23 / 0 评论 / 0 点赞 / 21 阅读 / 1460 字 / 正在检测是否收录...

Docker安装

  1. docker 一键安装
sudo curl -sSL https://get.daocloud.io/docker | sh
  1. 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
  1. 同步docker容器时区和时间
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
  1. 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)
0

评论区