편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.
최신판 | 당신의 편집 | ||
2번째 줄: | 2번째 줄: | ||
;Docker 프록시 설정 | ;Docker 프록시 설정 | ||
==현재버전== | |||
<syntaxhighlight lang='bash'> | |||
vi ~/.docker/config.json | |||
</syntaxhighlight> | |||
<syntaxhighlight lang='json'> | |||
{ | |||
"proxies": { | |||
"default": { | |||
"httpProxy": "http://proxy.example.com:3128", | |||
"httpsProxy": "https://proxy.example.com:3129", | |||
"noProxy": "*.test.example.com,.example.org,127.0.0.0/8" | |||
} | |||
} | |||
} | |||
</syntaxhighlight> | |||
==옛날버전== | |||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
mkdir -p /etc/systemd/system/docker.service.d | mkdir -p /etc/systemd/system/docker.service.d | ||
</syntaxhighlight> | </syntaxhighlight> | ||
9번째 줄: | 25번째 줄: | ||
cat <<EOF > /etc/systemd/system/docker.service.d/http-proxy.conf | cat <<EOF > /etc/systemd/system/docker.service.d/http-proxy.conf | ||
[Service] | [Service] | ||
Environment="HTTP_PROXY=http://proxy.example.com: | Environment="HTTP_PROXY=http://proxy.example.com:80/" | ||
Environment="NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp" | Environment="NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp" | ||
EOF | EOF | ||
17번째 줄: | 32번째 줄: | ||
systemctl daemon-reload | systemctl daemon-reload | ||
systemctl restart docker | systemctl restart docker | ||
</syntaxhighlight> | </syntaxhighlight> | ||
24번째 줄: | 38번째 줄: | ||
* [[WSL2 도커 프록시 설정하기]] | * [[WSL2 도커 프록시 설정하기]] | ||
* [[/etc/systemd/system/docker.service.d/http-proxy.conf]] | * [[/etc/systemd/system/docker.service.d/http-proxy.conf]] | ||
==참고== | ==참고== | ||
* https://docs.docker.com/config/daemon/systemd/#httphttps-proxy | * https://docs.docker.com/config/daemon/systemd/#httphttps-proxy | ||
[[분류: docker]] | [[분류: docker]] | ||
[[분류: 프록시]] | [[분류: 프록시]] |