0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[自分用メモ]Dockerのプロキシ設定

Posted at
  1. rootユーザに移行

  2. プロキシファイルディレクトリの作成

    mkdir -p /etc/systemd/system/docker.service.d/
    
  3. プロキシファイルの作成

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

    内容は以下のとおり

    [Service]
    Environment="HTTP_PROXY=http://<プロキシサーバーのアドレス>:<ポート番号>"
    Environment="HTTPS_PROXY=http://<プロキシサーバーのアドレス>:<ポート番号>"
    Environment="NO_PROXY=<除外するホスト名またはIPアドレス>"
    
  4. デーモンの再起動

    sudo systemctl daemon-reload
    
  5. Dockerの再起動

    sudo systemctl restart docker
    
  6. Dockerプロキシ設定の確認

    docker info
    

    以下のように、プロキシ設定が表示されればOK

     ~~~~
     HTTP Proxy: http://<プロキシサーバーのアドレス>:<ポート番号>
     HTTPS Proxy: http://<プロキシサーバーのアドレス>:<ポート番号>
     No Proxy: <除外するホスト名またはIPアドレス>
    ~~~~
    
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?