docker-install && configuration

docker install 指定版本

添加docker 阿里云源

1.cat >/etc/apt/sources.list.d/docker-main.list<

docker config

  1. Docker Config Registry
  • vi /lib/systemd/system/docker.service 在ExecStart后面添加如下命令:--insecure-registry=172.0.0.1 此IP根据私有仓库调整
  • systemctl daemon-reload
  • systemctl restart docker
  1. Docker Config proxy
  • vi /lib/systemd/system/docker.service 在ExecStart后面添加如下命令:--registry-mirror=https://n9h3vi0d.mirror.aliyuncs.com
  • systemctl daemon-reload
  • systemctl restart docker
  1. Docker Root Dir Config
  • vi /etc/docker/daemon.json 如没此文件,创建,添加:
    {
    "graph": "/mnt/data-docker"
    }
  • systemctl daemon-reload
  • systemctl restart docker

参考:
https://docs.docker.com/
https://www.xtplayer.cn/2017/02/2783

你可能感兴趣的:(docker-install && configuration)