LoginSignup
7

More than 3 years have passed since last update.

posted at

[エラー対処法]Dockerが動かない[Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?]

エラー内容

Dockerコマンドを叩くと以下のようなエラーが出てしまう。

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

原因/解決策

Dockerが起動できていない。
原因は、Dockerインストール後に起動させていないとか、Dockerを落としたのに起動処理を忘れているとか。
そのため、以下のコマンドで起動させれば解決する。

$ systemctl start docker

起動確認

コンテナ情報が表示された。

$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

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
What you can do with signing up
7