【问题标题】:Unable to connect to Docker daemon WINDOWS无法连接到 Docker 守护程序 WINDOWS
【发布时间】:2020-10-03 14:35:27
【问题描述】:

我已经为 WINDOWS 10 安装了 Stable Docker Desktop。我尝试运行:

docker run hello-world
    Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

看来它可以连接到 Docker 守护进程。但是,当我运行自己的命令时:

C:\Users\cortex>bash
DESKTOP-2GHN95P:/tmp/docker-desktop-root/mnt/host/c/Users/cortex/# cortex deploy

我收到以下错误:

error: unable to connect to the Docker daemon

please confirm Docker is running, or if Docker is not installed, install it by following the instructions for your operating system: https://docs.docker.com/install

我是 Docker 新手,无法弄清楚这个问题。有人有什么想法吗?

【问题讨论】:

    标签: windows powershell docker command-line-interface daemon


    【解决方案1】:

    看起来您正在尝试从 WSL 运行 cortex,该 WSL 正在尝试对主机操作系统中的 docker 引擎执行操作。如果您有 WSL 2,则可以在设置中为 Docker 桌面启用 WSL 2 集成。如果这不是一个选项,您可以随时在 WSL 上安装 docker,

    【讨论】:

      猜你喜欢
      • 2018-09-30
      • 1970-01-01
      • 2021-10-12
      • 1970-01-01
      • 2014-03-19
      • 1970-01-01
      • 2021-02-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多