安装 curl,

$ sudo apt-get install curl

 

 获取自动安装脚本,并执行安装 (Ubuntu, CentOS 通用),

$ curl -sSL https://get.daocloud.io/docker | sh

 

添加当前用户到 docker 用户组,

$ sudo usermod -aG docker $USER

 

配置镜像加速器 (建议使用 aliyun 个人账户下的镜像加速器)

针对Docker客户端版本大于 1.10.0 的用户

/etc/docker/daemon.json来使用加速器

sudo mkdir -p /etc/docker

运行,

sudo tee /etc/docker/daemon.json <<-'EOF'  # 从 stdin 得到数据,直到遇到 EOF 为止
{
  "registry-mirrors": ["https://********.mirror.aliyuncs.com"]
}
EOF

 启动服务,

sudo systemctl daemon-reload
sudo systemctl restart docker

 设置开机启动,

$ sudo systemctl enable docker

 

简单用法,

https://www.runoob.com/docker/docker-tutorial.html

 

 (完)

 

相关文章:

  • 2021-07-14
  • 2022-12-23
  • 2021-04-30
  • 2022-01-21
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2021-07-23
相关资源
相似解决方案