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?

More than 3 years have passed since last update.

[docker]fatal: unable to access 'https://github.com/oxequa/realize/': Could not resolve host: github.com の解決例

Last updated at Posted at 2021-11-03

何があった?

多人数開発の場面で他の人はうまくいくdocker-compose buildが、下記のエラーで自分だけうまく行かなかった

ターミナルの様子
$docker-compose build
Building app
=== 中略 === 
cd .; git clone -- https://github.com/oxequa/realize /go/src/github.com/oxequa/realize
Cloning into '/go/src/github.com/oxequa/realize'...
fatal: unable to access 'https://github.com/oxequa/realize/': Could not resolve host: github.com
package github.com/oxequa/realize: exit status 128
ERROR: Service 'app' failed to build : The command '/bin/sh -c GO111MODULE=off go get github.com/oxequa/realize' returned a non-zero code: 1

原因

dockerのバージョンが足りていなかった(version2.6だとこのエラーが出た)

解決策

dockerのバージョンを上げた(version3.6にした)

その他のパターン

解決策を探す中で下記の画面のproxiesを修正すると直るという記事(stackOverflowの記事)もあったので、筆者のもので直らなければこちらも参考にしてみてください。

スクリーンショット 2021-11-03 14.19.33.png

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?