Overview
Sometimes docker can not pull images, we need to configure the proxy.
Solution
Create /etc/systemd/system/docker.service.d/http-proxy.conf.
[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.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
December 12, 2024Less than 1 minute