zoukankan      html  css  js  c++  java
  • win10家庭版安装Docker for Windows

    1. 开启Hyper-V

    新建hyperv.cmd文件,内容如下:

    pushd "%~dp0"
    
    dir /b %SystemRoot%servicingPackages*Hyper-V*.mum >hyper-v.txt
    
    for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%servicingPackages\%%i"
    
    del hyper-v.txt
    
    Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL

    以管理员身份执行hyperv.cmd文件,然后重启

    重启成功后,打开Hyper-V

    2. 伪装成win10专业版

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

    REG ADD "HKEY_LOCAL_MACHINEsoftwareMicrosoftWindows NTCurrentVersion" /v EditionId /T REG_EXPAND_SZ /d Professional /F

    3. 下载Docker for Windows

     官网下载

    4、安装可能遇到的问题

    安装过程中可能会以下报错

    Containers Windows Feature is not available
       在 CommunityInstaller.EnableFeaturesAction.GetFeaturesToEnable()
       在 CommunityInstaller.EnableFeaturesAction.<DoAsync>d__29.MoveNext()
    --- 引发异常的上一位置中堆栈跟踪的末尾 ---
       在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       在 CommunityInstaller.InstallWorkflow.<HandleD4WPackageAsync>d__29.MoveNext()
    --- 引发异常的上一位置中堆栈跟踪的末尾 ---
       在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       在 CommunityInstaller.InstallWorkflow.<ProcessAsync>d__24.MoveNext()

    解决方法:

    将以下代码保存为批处理文件,然后管理员运行,重启、安装。

    pushd "%~dp0"
    dir /b %SystemRoot%servicingPackages*containers*.mum >containers.txt
    for /f %%i in ('findstr /i . containers.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%servicingPackages\%%i"
    del containers.txt
    Dism /online /enable-feature /featurename:Containers -All /LimitAccess /ALL
    pause
  • 相关阅读:

    windows+php+redis的安装
    redis配置
    vim常用快捷键
    php数组的操作技巧
    python3与mysql数据库连接方式
    linux下删除文件夹,修改文件夹下所有文件的权限命令
    Linux下 “.tar.gz”格式的解压与压缩
    Linux解压tar.gz文件时提示gzip:stdin:not in gzip format 错误
    Ubuntu 18.04中安装docker,再在docker中安装mysql,及遇见问题
  • 原文地址:https://www.cnblogs.com/liguix/p/12382089.html
Copyright © 2011-2022 走看看