我刚刚使用此处https://docs.docker.com/windows/step_one/提供的说明在我的Windows 7计算机上安装了Docker。
在安装过程中,我没有安装Git
和Virtual 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
答案 0 :(得分:4)
没关系。当我从Windows终端而不是Docker快速启动终端运行命令时,我犯了一个错误。一些命令最初工作,这让我想到使用Windows终端。
$ docker run hello-world
Hello from Docker.
This message shows that your installation appears to be working correctly.