windows - 无法在 Windows 7 上的 docker 中运行默认的 hello-world 程序

标签 windows docker docker-compose

我刚刚使用此处提供的说明在我的 Windows 7 机器上安装了 Docker https://docs.docker.com/windows/step_one/ .

在安装过程中,我没有安装 GitVirtual Box,因为我已经在我的机器上安装了它们。安装后,我修复了丢失的 bash.exe 脚本问题,并让 docker 在一定程度上工作。但是我无法运行默认的 hello-world docker 命令。我收到以下错误。

我已经调查过 SO Troubleshoot Docker-On-Windows attempt to run hello-world 中提到的类似问题但是我在这里得到的错误是不同的。所以请不要将其标记为重复。

$ docker run hello-world
docker: An error occurred trying to connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/containers/create: open //./pipe/docker_engine: The system cannot find the file specified..
See 'docker run --help'.

$ docker version
Client:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:20:08 2016
 OS/Arch:      windows/amd64
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/version: open //./pipe/docker_engine: The system cannot find the file specified.


$ docker-machine start default
Starting "default"...
Machine "default" is already running.

$ docker-machine env default
SET DOCKER_TLS_VERIFY=1
SET DOCKER_HOST=tcp://192.168.99.100:2376
SET DOCKER_CERT_PATH=C:\Users\chandeln\.docker\machine\machines\default
SET DOCKER_MACHINE_NAME=default
REM Run this command to configure your shell:
REM     @FOR /f "tokens=*" %i IN ('docker-machine env default') DO @%i

$ git --version
git version 2.7.4.windows.1

最佳答案

没关系。我犯了一个错误,因为我是从 Windows 终端而不是 Docker 快速启动终端运行命令的。有些命令最初有效,这让我想到了使用 Windows 终端。

$ docker run hello-world

Hello from Docker.
This message shows that your installation appears to be working correctly.

关于windows - 无法在 Windows 7 上的 docker 中运行默认的 hello-world 程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37840056/

相关文章:

c - 在 Windows 上获取 c 目录中的每个文件

docker - 微服务中的服务发现与docker中的服务发现

用于运行 docker 的 Python 脚本

node.js - docker + Node : node_modules not the same between docker-compose up and docker-compose run

docker - 由节点Alpine和mysql构建的Docker-compose推送镜像

windows - 选择 'Run as administrator' 后,网络共享上的批处理文件立即关闭

java - groovy win cmd 行类和脚本

android - 添加新菜单项以右键单击(所有平台)

docker - 如何通过 echo 命令向 mac 控制台发送消息? (适用于 Mac 的 docker )

linux - Docker 升级因冲突而失败