如何在 Linux 上的 Windows VM 上运行 docker

如何在 Linux 上的 Windows VM 上运行 docker

我的情况如下:我在一台 Linux 机器(Linux Mint 18.2)上工作,使用 .NET Core。一个特定的项目需要使用 .NET Framework,所以我用 VirtualBox 启动了一个 Windows 10 虚拟机。现在我需要将此应用程序打包到 docker 容器中。我尝试在 Windows VM 上安装 docker,但在启动守护程序时总是出现错误,并且在运行 docker build 时出现此错误:

error during connect: Post 
open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

我的问题是,这可能吗?是否有一些配置可以让docker在Windows VM上运行,还是我需要在独立系统上运行?

答案1

和往常一样,我在发布此文后立即就找到了答案。Windows 上的 Docker 默认使用 Linux 容器,这导致了错误。切换到 Windows 容器后,一切正常。

相关内容