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-composeのビルドが通らず焦ってたらしょうもないオチに辿り着いた話

Last updated at Posted at 2022-02-15

はじめに

 エラーメッセージでググってこの記事に辿り着いた方は,まず他の記事を先に読んだ方がいいと思います.

本題

 いつも通りdocker使って開発環境建てようとしていたとき.

ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

というエラーが出た.
別のファイルでは変わらずビルドできてるのに...

オチ

 docker-compose内でサービス名に大文字を使っていたのが原因だった.

services:
  Hoge: ←こういうのがダメ
  ...
Building Hoge
invalid argument "Hoge" for "-t, --tag" flag: invalid reference format: repository name must be lowercase
See 'docker build --help'.
ERROR: Service 'Hoge' failed to build : Build failed

教訓

 上記のエラーメッセージでググると docker daemon がどうたらみたいな記事がたくさん出てきますが,全然関係ありませんでした.同じエラーでもめちゃくちゃマイナーな出方されると辛いよね...

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?