Docker 使用

安装 Docker 程序

curl -fsSL https://get.docker.com -o get-docker.sh
sudo DOWNLOAD_URL=https://mirrors.aliyun.com/docker-ce sh get-docker.sh

ustc docker 文档

为 Docker 守护进程配置代理

vi /etc/docker/daemon.json
{
  "proxies": {
    "http-proxy": "http://127.0.0.1:7890",
    "https-proxy": "http://127.0.0.1:7890",
    "no-proxy": "*.aliyun.com,*.*.aliyuncs.com,127.0.0.0/8"
  }
}

配置后重启 docker

sudo systemctl restart docker

参考链接

Configure the Docker daemon to use a proxy server

Configure the Docker daemon

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9