win10专业版可以利用Hyper-V开启docker,一般升级而来的都是家庭版,现在要升级到win10专业版, 需要产品秘钥。 github网址:https://github.com/docker/for-win .
安装的教程可以看:http://blog.csdn.net/zdy0_2004/article/details/52084452 大致的流程:
https://download.docker.com/win/stable/InstallDocker.msi
控制面板 -> 程序 -> 启用或关闭Windows功能 -> 选中Hyper-V
用刚才下载的安装包安装,安装完成后,启动Docker 如果没有开启Hyper-V,启动Docker的时候会提示开启Hyper-V
window,win+R,打开CMD键入后续内容: 查看版本等信息
docker info
docker run hello-world
run hello-world运行成功之后,就代表安装完成了。但是,可能容易链接不到,要多执行几次。 报错内容为:
docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fhello-world%3Apull&service=registry.docker.io: net/http: TLS handshake timeout.
See 'docker run --help'.
.
之前的博客直接用以下命令:
docker run -it ubuntu bash
不能登录上,因为调取的外网。所以可以用国内Daocloud下载一个”加速器“,也有人推荐阿里云的容器镜像平台(来自云端的容器镜像服务),另外也发现了一个比较好的开源镜像平台:清华大学开源软件镜像站
https://cr.console.aliyun.com/
进入控制面板,点击加速器: 加速器地址:https://www.daocloud.io/mirror#accelerator-doc
然后右键右下角的docker,在桌面右下角状态栏中右键 docker 图标,加到”registry-mirrors”的数组里。点击 Apply 。
设置好之后会重启
镜像仓库里面有很多人上传的镜像,直接执行:
docker run daocloud.io/ubuntu:14.04 grep -v '^#' /etc/apt/sources.list
就可以获得ubuntu14.04的镜像, 同时我也发现了caffe的镜像:
docker pull daocloud.io/zjxuan/caffe:latest
docker run -it daocloud.io/zjxuan/caffe:latest
其中笔者打开镜像后,看到python里面是可以成功运行
import caffe
可以新手试试
键入以上命令进入镜像,不过出现了很多报错:
: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-i386/Packages Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-i386/Packages Something wicked happened resolving 'archive.ubuntu.com:http' (-5 - No address associated with hostname)
有人说的解决方案是:设置妥当DNS服务器即可,没成功(http://blog.csdn.net/npy_lp/article/details/42080553)
.
右键右下角的小鲸鱼,然后settings,advanced就可以看到了。 .