参考前文Win11环境下折腾WSL2中的Debian11 到 启用systemd
步骤
参考Debian 安装国内源 Docker 及其他常用软件
到2.4节,安装完Docker步骤
阿里云镜像配置
Docker搭建青龙面板
docker-compose up -d
步骤报错:
ERROR: Couldn’t connect to Docker daemon at http+docker://localunixsocket - is it running?...
参考
sudo gpasswd -a ${USER} docker
报错:Command 'docker-compose' not found
参考
sudo apt install docker-compose
拉去镜像超时报错:ERROR: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
参考
sudo mkdir -p /etc/systemd/system/docker.service.d
touch /etc/systemd/system/docker.service.d/http-proxy.conf
sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
#查看主机ip
ip route show | grep -i default | awk '{ print $3}'
# 文件内容
[Service]
Environment="HTTP_PROXY=http://172.20.176.1:9002"
Environment="HTTPS_PROXY=socks5://172.20.176.1:9001"
Environment="NO_PROXY=cxwc2g9l.mirror.aliyuncs.com,127.0.0.1, 172.20.176.0"
重启服务
sudo systemctl daemon-reload
sudo systemctl restart docker