2
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 1 year has passed since last update.

【docker】dockerコマンドが効かずエラーが出た時の対処法

Last updated at Posted at 2022-03-07

ubuntu(WSL2)でdockerコマンドを実行したらエラーが発生したので対処法についてメモしておく。

問題

ubuntu(WSL2)の起動時にdockerコマンドを実行したら下記のエラーが発生した。

$ docker images
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 

解決策

このエラーは、dockerが起動していないことが原因らしい。
そのため、下記のコマンドでdockerを起動させることで、エラーは解消される。【参考:Docker docs

$ service docker start

// 確認
$ service docker status
* Docker is running

しかし、dockerの起動はシステムの起動時に毎回行う必要があるらしい。

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