win10 家庭版安装Docker

本文详细介绍了如何在Windows 10家庭版上安装Docker,包括开启Hyper-V、伪装系统版本为专业版及安装过程中可能遇到的问题及其解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 开启Hyper-V

  1. 新建hyperv.cmd文件,输入内容如下并保存:
    pushd "%~dp0"
    
    dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
    
    for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
    
    del hyper-v.txt
    
    Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
    
  2. 右击该文件以管理员身份执行hyperv.cmd文件。如果系统要你重启,便重启。
  3. 在控制面板->程序和功能->启用或关闭Windows功能打开Hyper-V。

2. 伪装成win10专业版

以管理员身份打开cmd。
执行如下命令:

REG ADD "HKEY_LOCAL_MACHINE\software\Microsoft\Windows NT\CurrentVersion" /v EditionId /T REG_EXPAND_SZ /d Professional /F

3. 下载Docker for Windows

下载地址:https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe
官网下载链接(需FQ): https://store.docker.com/editions/community/docker-ce-desktop-windows

国内镜像:
https://oomake.com/download/docker-windows (百度网盘)
https://mirrors.ustc.edu.cn/docker-ce/ (版本更新不及时)

下载后直接安装,安装时注意取消勾选window容器(默认不会勾选)。

Docker安装成功后,执行cmd命令。

docker version

docker for windows could not read CA certificate问题

问题原因:
之前安装过 docker toolbox。

解决步骤:

  1. 删掉四个docker 的环境变量
  2. 执行cmd命令
    docker-machine rm default
    
  3. 以管理员身份执行cmd命令
    @FOR /f "tokens=*" %i IN ('docker-machine env -u') DO @%i
    

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.39/containers/json: 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

解决步骤:

  1. 首先检查docker是否启动
  2. 如果docker已经启动还报error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.39/containers/json: 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 错误。管理员启动cmd运行如下命令:
    docker-machine env --shell cmd default
    //或者
    docker-machine env default
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值