首页 > 技术文章 > docker desktop 安装踩坑纪要

go-wandering 2021-10-17 23:45 原文

win10 家庭版,原本系统更新后可以直接安装docker desktop并正常运行,无奈安装了个手机模拟器后,docker desktop启动不了...

启动后提示:
Hardware assisted virtualization and data execution protection must be enabled in the BIOS. See https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization

命令行执行docker version,错误提示:
error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.

提示说是没有足够的权限执行docker守护进程连接...
想着会不会是安装手机模拟器时提示跟hyper-V冲突,果然,查看系统hyper-V服务找不着了,
接着,安装并启用hyper-V,

(参考 win10安装hyper-V 链接:https://www.cnblogs.com/go-wandering/p/15418781.html)

打开docker安装目录,开启docker守护进程,问题终于解决了

注意,还有可能是WSL2没安装(WSL2安装好后记得重启),记得查看新生成的虚拟子系统,除了默认的

执行docker-compose -f openresty.yml up -d
错误提示
ERROR: In file '.\openresty.yml', service 'image' must be a mapping not a string.
检查yml 文件缩进问题

推荐阅读