安装DockerToolbox出现问题,无法使用

{

香港vps云主机 云服务器 月付 租用超国内大带宽稳定高速 可试用 :http://www.soar-clouds.com/

}

一、问题描述:安装过Docker Toolbox,卸载后,重新安装,无法正常使用,提示

Running pre-create checks...
Error with pre-create check: "Hyper-V is installed. VirtualBox won't boot a 64bits VM when Hyper-V is activated. If it's installed but deactivated, you can use --virtualbox-no-vtx-check to try anyways"
Looks like something went wrong in step ´Checking if machine default exists´
二、解决方法(参考:谢谢参考文献,试过有用。)

1.以管理员方式打开cmd,输入以下命令。(第二行命令参考第一行命令返回的结果)

C:\>bcdedit /copy {current} /d "No Hyper-V" 
The entry was successfully copied to {ff-23-113-824e-5c5144ea}. 

C:\>bcdedit /set {ff-23-113-824e-5c5144ea} hypervisorlaunchtype off 
The operation completed successfully.
2.重启电脑,选择No Hyper-V 系统,进入电脑。

安装DockerToolbox出现问题,无法使用_第1张图片

3.下载安装Docker Toolbox。

4.打开安装目录,找到start.sh。

编辑start.sh,找到下面的代码片段:

STEP="Checking if machine $VM exists"
if [ $VMEXISTSCODE -eq 1 ]; then
  "${DOCKERMACHINE}" rm -f "${VM}" &> /dev/null || :
  rm -rf ~/.docker/machine/machines/"${VM}"
  #set proxy variables if they exists
  if [ -n ${HTTPPROXY+x} ]; then
    PROXYENV="$PROXYENV --engine-env HTTPPROXY=$HTTPPROXY"
  fi
  if [ -n ${HTTPSPROXY+x} ]; then
    PROXYENV="$PROXYENV --engine-env HTTPSPROXY=$HTTPSPROXY"
  fi
  if [ -n ${NOPROXY+x} ]; then
    PROXYENV="$PROXYENV --engine-env NOPROXY=$NOPROXY"
  fi
"${DOCKERMACHINE}" create -d virtualbox $PROXYENV "${VM}" fi
将最后第二行改为:

"${DOCKERMACHINE}" create -d virtualbox --virtualbox-no-vtx-check $PROXYENV "${VM}"
5.可以正常使用Docker Quickstart Termial了。


6.以后要用Docker,都要进入N0 Hyper-V 。


你可能感兴趣的:(Docker)