2
1

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.

Windows7 proxy配下で、Vagrant上、docker build エラー

Posted at

docker build app等をした際に、

Error while pulling image: Get https://index.docker.io/v1/repositories/library/debian/images: dial tcp: lookup index.docker.io: no such host

とか出る。
つまり最初のdocker pull debian:jessieでいきなり名前解決エラー。

やったこと

vagrant sshした後に、環境変数、http_proxyとhttps_proxyを設定した。
→変化なし

vagrant upする前に、環境変数、http_proxyとhttps_proxyを設定した。
→変化なし

vagrant-proxyconfというpluginをインストールして、Vagrantfileに以下のようにproxyを設定して、再度vagrant up
→うまくいった!

正解

vagrant-proxyconfというpluginをインストールして、Vagrantfileにproxyの設定を追加。

if Vagrant.has_plugin?("vagrant-proxyconf")
  config.proxy.http     = "http://hoge.co.jp:8080/"
  config.proxy.https    = "http://hoge.co.jp:8080/"
  config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end

参考

vagrant-proxyconf
https://github.com/tmatilai/vagrant-proxyconf/

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?