加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

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

发布时间:2020-12-14 01:38:09 所属栏目:Windows 来源:网络整理
导读:我刚刚使用 https://docs.docker.com/windows/step_one/提供的说明在我的Windows 7机器上安装了Docker. 在安装过程中,我没有安装Git和Virtual Box,因为我已经在我的机器上安装了它们.安装后我修复了丢失的bash.exe脚本问题,并在某种程度上使docker工作.但是
我刚刚使用 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:Userschandeln.dockermachinemachinesdefault
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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读