vagrant | virtualbox
docker安装指南 下载docker github安装下载最新镜像boot2docker 在1.9.0.6版本的dockers的iso有问题,会让人反复下载 此时,用此网址: https://hexed.it/ 在偏移量为0x8020处黏贴v18.09.0,选择覆盖而不是增加 修改完成后export,用docker quickstart terminal完成后续过程即可
# 需要一个docker-compose.yml文件 docker-compose build docker-compose up win10 14932之后的版本 vagrant可以非常容易的创建一台linux虚拟机 下载后的使用方法 vagrant box add centos7 ./CentOS-7.box vagrant init centos7 vagrant up vagrant init centos/7 # 初始化一个Vargantfile(虚拟机描述) # 打开# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1" # 否则ssh一直连接不上 # vbox需启动 vagrant up # 很慢 # 或者vagrant up --provider=vmware_fusion # 使用vmware vagrant ssh # 通过ssh进入刚创建的虚拟机 exit vagrant status vagrant halt # 关闭 vagrant status # poweroff vagrant destroy # 删除虚拟机
https://www.cnblogs.com/vishun/archive/2017/06/02/6932454.html
http://mirrors.ustc.edu.cn/ http://mirrors.ustc.edu.cn/centos-cloud/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-2002_01.VirtualBox.box
1、首次启动删除
遇到的bug
解决: C:\Windows\system32>docker version could not read CA certificate "C:\\Users\\Administrator\\.docker\\machine\\machines\\default\\ca.pem":
open C:\Users\Administrator\.docker\machine\machines\default\ca.pem: The system cannot find the path specified. 在windows上我是这样做的: 1,删掉所有docker 的环境变量,好像是有四个, 2,看下 docker-machine ls 是否有default 或者其他 存在。。有则删除 docker-machine rm default 3、全部删除掉,docker-machine env -u 4、 @FOR /f "tokens=*" %i IN ('docker-machine env -u') DO @%i OK 解决ssh key 卡住 编辑Vagrantfile 打开 config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1" Hardware assisted virtualization and data execution protection must be enabled in the BIOS Open PowerShell as administrator and # Enable Hyper-V with dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All # OR # Enable Hypervisor with: bcdedit /set hypervisorlaunchtype auto Now restart the system and try again. no matching manifest for unknown in the manifest list entries settings设置 { "registry-mirrors": [ "https://registry.docker-cn.com", "https://duado9su.mirror.aliyuncs.com" ], "experimental": true }