type
Post
status
Published
date
Jun 11, 2024
slug
summary
tags
Docker
category
各种杂项
icon
password
URL
Photo
现状
root@ubuntu ~$ ping -c 4 get.docker.com PING get.docker.com (104.244.43.234) 56(84) bytes of data. --- get.docker.com ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3051ms
安装脚本
参考文章
# 安装docker sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl software-properties-common lrzsz -y sudo curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update sudo apt-get install docker-ce -y sudo sed -i 's|ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock|ExecStart=/usr/bin/dockerd|g' /usr/lib/systemd/system/docker.service # 添加代理 sudo mkdir -p /etc/systemd/system/docker.service.d sudo touch /etc/systemd/system/docker.service.d/proxy.conf sudo echo "[Service] Environment=\"HTTP_PROXY=http://127.0.0.1:7890/\" Environment=\"HTTPS_PROXY=http://127.0.0.1:7890/\" Environment=\"NO_PROXY=localhost,127.0.0.1,.example.com\" " > /etc/systemd/system/docker.service.d/proxy.conf sudo systemctl daemon-reload && sudo systemctl restart docker