LoginSignup
0
0

More than 3 years have passed since last update.

dockerコマンド実行時に出たエラー

Last updated at Posted at 2020-08-08

dockerのimageを作成しようとしたら以下のエラー発生

$ docker-compose build
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.

ググって見つけた記事には権限を変更しろとあるので以下を実行(ec2等の場合はexitしてから再起動)
$ sudo usermod -aG docker $USER
$ sudo chmod +x /usr/local/bin/docker-compose

しかし、エラーは変化せず。。。
試しに以下のコマンドを実行するとrunningになっていなかった。
$ sudo service docker status

dockerをスタートさせたら無事にコマンドが通るようになった。
$ sudo service docker start

エラー出たらまずstatus確認するの大事ですね!

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