LoginSignup
40
35

More than 5 years have passed since last update.

DockerをProxy配下で使う CentOS7

Posted at

CentOS7でDockerをProxy配下で利用する場合の設定
docker searchdocker pullが失敗するときに・・・

※コンテナ内部から外部へ出る場合のProxyとは違う


docker.serviceをコピー

# cp /usr/lib/systemd/system/docker.service /etc/systemd/system/

コピーしたdocker.serviceのExecStartコマンドの直前にProxyの設定を追加

docker.service
Environment="HTTP_PROXY=http://user:pwd@proxy.example.com:8080"

設定を再読込 & Docker再起動

# systemctl daemon-reload
# systemctl restart docker
40
35
1

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
40
35