安装Docker Toolbox后出现的问题
Installing Docker Toolbox on Windows with Hyper-V Installed
Installing Docker on Windows is a fairly simple and straightforward process. It is very well documented here. However if you have Hyper-V installed as I do, the instructions will not work right out of the box. If you try to start the Docker Quickstart Terminal, you'll get the following error message:
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´
The issue is that when you run the terminal the very first time, the startup script attempts to create the default virtual machine in which the docker containers will run. This step of the process fails if you have Hyper-V installed, even if it is disabled. In my case, I do have it installed but I have a boot option set up to disable it when I am not using it. This post describes how to change the Docker startup script to allow you to create the default virtual machine using the startup script and still keep Hyper-V installed.
Before you start with the installation of Docker, I would suggest disabling Hyper-V. If you don't know how to do this, follow these instructions. Once you have disabled Hyper-V, the first step is to install Docker using the installer for Windows. The installation should run without any issues before you proceed with the next steps.
Once you have installed Docker, we'll modify the startup file to allow it to create the default VM. The file we want to modify is located under C:\Program Files\Docker Toolbox and is called called start.sh. To modify the file you'll have to open the file in an editor running as Administrator. If you don't open an elevated editor, you won't be able to save your changes.
It's now time to edit the file, but before you do so, you may want to save a copy of the original file. Just in case. In your editor, locate the following code snippet:
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
The second to last line is where the vm is created:
"${DOCKERMACHINE}" create -d virtualbox $PROXYENV "${VM}"
You will need to modify that line and add the --virtualbox-no-vtx-check switch to. The end result is that the line will look like this:
"${DOCKERMACHINE}" create -d virtualbox --virtualbox-no-vtx-check $PROXYENV "${VM}"
Save your changes and now you should be able to run the quickstart terminal without any issues.
安装Docker Toolbox后出现的问题的更多相关文章
- WIN7安装Docker Toolbox、制作镜像并发到阿里云
一.安装Docker Toolbox,并配置国内源加速 WIndows7不支持Hyper-v,所以只能采用Docker Toolbox的方式使用Docker.传送门:http://mirrors.al ...
- win7下安装docker toolbox
我的笔记本是win10系统,上面安装docker非常简单.只要在官网下载然后一路next就可以了.然而办公室的电脑装的是win7,我也懒得给它换win10.没想到,win7下安装docker这么费劲. ...
- Window 7 安装Docker toolbox , 启动terminal时遇到的小问题
参考:http://blog.csdn.net/tina_ttl/article/details/51372604 参考前面网页成功安装后打开terminal,出现下面问题: Looks like s ...
- Windows10下的docker安装与入门 (一)使用docker toolbox安装docker
Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制,相互之间不会有任何 ...
- Windows10 使用docker toolbox安装docker
一.介绍 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制,相互之间 ...
- (转)Windows10下的docker安装与入门 (一)使用docker toolbox安装docker
Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制,相互之间不会有任何 ...
- docker toolbox在win7下的安装
1.下载安装docker toolbox docker toolbox的下载地址: http://mirrors.aliyun.com/docker-toolbox/windows/docker-to ...
- Docker Toolbox安装
公司最近搭建docker环境,其中会遇到一些问题,在这里记录一下. 先来了解一下docker 一.基本概念 1.Docker中基本概念镜像(Image) 提到镜像,有对操作系统有一定认知的都知道,镜像 ...
- 【学习】在Windows10平台使用Docker ToolBox安装docker(一)
前言:今天距离元旦还有44天,时间点是18:11:45,想了想一路学习的过程和其中遇到的困难,其中有克服的,有放弃的,这有可能是我自己意志不坚定吧,学习docker也是我当下的一个目标,不知道会是成功 ...
随机推荐
- 网络邂逅&网络异步请求
什么是卡,网络慢,且你只能等着它加载完不能做别的事 这里便引申出网络异步请求的概念 #import "ViewController.h" @interface ViewContro ...
- mvc4 用NPOI导出Excel
第一次做数据导出Excel,刚看到这个的时候,首先想到的就是新建一个excel的文件,然后将它下载,后来询问别人,他们都推荐使用NPOI,发现这个很好用,就用博客记录一下 1.引用NPOI包 2.导出 ...
- iOS通讯录开发
场景一:直接选择一个联系人的电话号码 这里不需要先获取所有的联系人自己做联系人列表,直接使用系统自带的AddressBookUI/ABPeoplePickerNavigationController. ...
- 软件测试人员必备Linux命令(初、中、高级)
有些技能可以事半功倍,有些命运掌握在我们手中.熟练的掌握和使用这些命令可以提高工作效率,并且结合这些命令对测试过程中遇到的问题进行一些初步的定位. 1 目录与文件操作1.1 ls(初级)使用权限:所有 ...
- CommonJS的模块规范
CommonJS对模块的定义十分简单,主要分为模块引用.模块定义和模块标识. 1.模块引用 var math = require('math');//这个方法接受模块标识,以此引入一个模块的API到当 ...
- 心理控制方法——阅读Notes
1.自助式情感手术 祛除自我意象中的伤疤的要点 2. 你制造错误,但是错误不应造就你 你身上的缺点不是你的错 3. 不仅要原谅别人,也要原谅自己 4. 怨恨是一条通向失败的道路 5. 注意来 ...
- 区别和详解:js中call()和apply()的用法
1.关于call()和apply()的疑点: apply和call的区别在哪里 什么情况下用apply,什么情况下用call apply的其他巧妙用法(一般在什么情况下可以使用apply) 2.语法和 ...
- canvas作为背景
比如canvas的id是HB, 画好后执行document.body.style.background = "url('"+HB.toDataURL()+"')" ...
- 使用HTTP方式远程连接PowerShell
借助Windows PowerShell,我们可以像管理Linux一样使用命令行来远程管理Windows服务器.但是默认情况下,我们只能在域环境中使用PowerShell Remoting.如果是通过 ...
- 编译Ansj之Solr插件
Ansj是一个比较优秀的中文分词组件,具体情况就不在本文介绍了.ansj作者在其官方代码中,提供了对lucene接口的支持.如果用在Solr下,还需要简单的扩展一下. 1.基于maven管理 ansj ...