27
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Proxy環境下、Ubuntu16.04でdockerを動かす

Last updated at Posted at 2016-05-10

いろいろ情報を探してましたが、公式のドキュメントに対応方法が載ってましたw

daemonにproxyの環境変数を認識させる必要がありますが、systemdの流儀に則って指定しなければならないようです。

dockerサービス用ディレクトリ作成

# mkdir /etc/systemd/system/docker.service.d

dockerサービス用ディレクトリ下に、http-proxy.confファイルを作成

 # vi /etc/systemd/system/docker.service.d/http-proxy.conf

http-proxy.confファイルに下記の内容を入力し、保存

[Service]
Environment="HTTP_PROXY=http://(proxyのアドレス):(proxyのポート番号)/"

dockerサービスの再起動

# systemctl daemon-reload
# systemctl restart docker
27
25
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
27
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?