LoginSignup
3
0

More than 1 year has passed since last update.

エラー:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?が出た場合の対処法

Last updated at Posted at 2022-03-29

下記のような感じで、Dockerに関するコマンドを打つとエラーが出る。どうやらDockerが起動していないことで起きるエラーのようです。

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

ちなみにバージョンは以下の通りです。

% docker --version
Docker version 20.10.13, build a224086

※試したこと

% systemctl start docker
zsh: command not found: systemctl
% service start docker
zsh: command not found: service
% systemctl enable docker
zsh: command not found: systemctl

起動中のコンテナ表示

% sudo docker container ls -a
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

などなど、検索してそれっぽいのが出てきたら片っ端から打ってみましたが全部ダメっぽいですね、、、

解決法:アプリをクリックして起動させる。

これでひとまず解決しました。
ただCUIで操作できないのは問題ですね、、原因がわかったら追記します。

開発環境
mac OS バージョン11.6
エディタ
VScode

3
0
2

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
3
0