본문 바로가기

OpenSource/Docker

[Docker] 이미지 다운로드를 위한 Proxy 설정

$ sudo mkdir -p /etc/systemd/system/docker.service.d
$ sudo vi /etc/systemd/system/docker.service.d/http-proxy.conf

## PROXY 정보 추가
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80"
Environment="HTTPS_PROXY=https://proxy.example.com:443"
Environment="NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp"

$sudo systemctl daemon-reload
$sudo systemctl restart docker