老师,我看了,安装依赖需要使用sudo指令,可是使用git bash显示sudo指令不存在

老师,我看了,安装依赖需要使用sudo指令,可是使用git bash显示sudo指令不存在

$ sudo yum install -y yum-utils \ device-mapper-persistent-data \ lvm2

bash: sudo: command not found

而且安装完docker之后运行docker  run  hello-world,

从远程仓库拉取代码成功,但是之后就没有反应了,是因为没有安装依赖的原因吗

几次没有反应之后强行关闭git-bash,再次运行docker  run  hello-world

C:\Program Files\Docker\Docker\resources\bin\docker.exe: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/create: 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.

See 'C:\Program Files\Docker\Docker\resources\bin\docker.exe run --help'.

就出现如上的错误,是否需要更改镜像地址呢


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
Brian 2020-04-03 00:43:38

你首先要清楚,sudo这个命令是在linux上才有的。


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服务?docker服务有没有正常的运行起来!


docker最理想的运行环境是Linux,学习起来会少走很多弯路。建议使用windows的hypver-v或者vmware来创建虚拟机,在虚拟机中使用。

  • 提问者 慕用0863198 #1
    ……额,虚拟机,我硬盘空间不够来着,docker服务一直开着的
    2020-04-03 00:46:01
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师