LoginSignup
17
17

More than 5 years have passed since last update.

IntraにDocker Registryを立てたときはNO_PROXYも忘れずに

Last updated at Posted at 2014-08-19

社内LANにDocker Registryを立てていたのですが、NO_PROXYを設定し忘れててはまりました。

DockerデーモンのProxy設定

CoreOSはこんな感じ。試していませんが同じくsystemdを採用したCentOS 7も同様でしょう。
ExecStartの前で環境変数を設定するのがポイントです。

# /etc/systemd/system/docker.service
...
[Service]
...
Environment="HTTP_PROXY=YOUR.PROXY.HOST:PORT"
Environment="NO_PROXY=NO.PROXY.HOST1,NO.PROXY.HOST2"
ExecStart=/usr/bin/docker -d -s=btrfs -r=false -H fd://
...

CentOS 6はこちら。

# /etc/sysconfig/docker
other_args="--exec-driver=lxc --selinux-enabled"
export HTTP_PROXY=YOUR.PROXY.HOST:PORT
export NO_PROXY=NO.PROXY.HOST1,NO.PROXY.HOST2

参考

17
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
17