【备忘】使用 Docker Machine 创建虚拟机的脚本及参数
来源:互联网 发布:淘宝大熊哥佛牌怎么样 编辑:程序博客网 时间:2024/05/20 06:49
# 1.使用Docker Machine创建virtualBox虚拟机的命令:
$docker-machine create \
--driver virtualbox \
--virtualbox-cpu-count "1" \
--virtualbox-disk-size "20000" \
--virtualbox-memory "1024" \
--engine-registry-mirror https://registry.docker-cn.com \
--engine-registry-mirror=https://2lqq34jg.mirror.aliyuncs.com \
test1
# 2.以下只用163的镜像加速器创建Docker虚拟机:
$ docker-machine create \
-d virtualbox \
--virtualbox-disk-size=20000 \
--virtualbox-memory=1024 \
--virtualbox-cpu-count=1 \
--engine-insecure-registry=192.168.99.102:5000 \
--engine-registry-mirror=http://hub-mirror.c.163.com \
test2
# 执行docker pull xxx下载Docker镜像一样飞快!!!
# 3.多个(--engine-registry-mirror)参数可以同时使用:
$ docker-machine create \
-d virtualbox \
--virtualbox-disk-size=50000 \
--virtualbox-memory=2048 \
--virtualbox-cpu-count=2 \
--engine-insecure-registry=192.168.99.102 \
--engine-registry-mirror=http://ab330b6b.m.daocloud.io \
--engine-registry-mirror=https://2lqq34jg.mirror.aliyuncs.com \
--engine-registry-mirror=http://hub-mirror.c.163.com \
--engine-registry-mirror=https://pee6w651.mirror.aliyuncs.com \
test3
# 使用多个加速器以后,下载Docker镜像飞快!!!
# 4. Docker Machine 创建VM时,使用--driver virtualbox 驱动,可用的参数:
--virtualbox-boot2docker-url
The URL of the boot2docker image. Defaults to the latest available version[$VIRTUALBOX_BOOT2DOCKER_URL]
--virtualbox-cpu-count "1"
number of CPUs for the machine (-1 to use the number ofCPUs available)[$VIRTUALBOX_CPU_COUNT]
--virtualbox-disk-size "20000"
Size of disk for host in MB [$VIRTUALBOX_DISK_SIZE]
--virtualbox-host-dns-resolver
Use the host DNS resolver [$VIRTUALBOX_HOST_DNS_RESOLVER]
--virtualbox-hostonly-cidr "192.168.99.1/24"
Specify the Host Only CIDR [$VIRTUALBOX_HOSTONLY_CIDR]
--virtualbox-hostonly-nicpromisc "deny"
Specify the Host Only Network Adapter Promiscuous Mode [$VIRTUALBOX_HOSTONLY_NIC_PROMISC]
--virtualbox-hostonly-nictype "82540EM"
Specify the Host Only Network Adapter Type [$VIRTUALBOX_HOSTONLY_NIC_TYPE]
--virtualbox-hostonly-no-dhcp
Disable the Host Only DHCP Server [$VIRTUALBOX_HOSTONLY_NO_DHCP]
--virtualbox-import-boot2docker-vm
The name of a Boot2Docker VM to import [$VIRTUALBOX_BOOT2DOCKER_IMPORT_VM]
--virtualbox-memory "1024"
Size of memory for host in MB [$VIRTUALBOX_MEMORY_SIZE]
--virtualbox-nat-nictype "82540EM"
Specify the Network Adapter Type [$VIRTUALBOX_NAT_NICTYPE]
--virtualbox-no-dns-proxy
Disable proxying all DNS requests to the host [$VIRTUALBOX_NO_DNS_PROXY]
--virtualbox-no-share
Disable the mount of your home directory [$VIRTUALBOX_NO_SHARE]
--virtualbox-no-vtx-check
Disable checking for the availability of hardware virtualization before the vm is started [$VIRTUALBOX_NO_VTX_CHECK]
--virtualbox-share-folder
Mount the specified directory instead of the default home location. Format: dir:name [$VIRTUALBOX_SHARE_FOLDER]
--virtualbox-ui-type "headless"
Specify the UI Type: (gui|sdl|headless|separate) [$VIRTUALBOX_UI_TYPE]
- 【备忘】使用 Docker Machine 创建虚拟机的脚本及参数
- Docker Machine 使用备忘
- Mac使用docker及docker-machine命令
- 使用 docker-machine 管理 Azure 容器虚拟机
- docker-machine的基本使用
- 使用Docker Toolbox 创建v1.12.6版的Docker虚拟机的方法-注意正确使用本地文件 file:参数的路径名
- 用docker-machine创建虚拟主机
- Docker Machine 创建 Azure 虚拟主机
- 使用Virtual Machine Manager 创建和管理虚拟机
- ubuntu,docker旧版本卸载,脚本安装新版本及boot2docker如何修改docker daemon的启动参数
- docker-machine的安装
- Docker run 命令参数及使用
- 【手工解决】使用 DockerToolbox 创建指定版本的 Docker 虚拟机环境
- 虚拟机使用备忘_vmware
- ubuntu使用virt 创建虚拟机参数代码
- docker的创建和使用
- 用 Docker Machine 一次创建上百台Docker Swarm集群主机的方法
- 使用 Docker Toolbox 自动创建 Swarm 集群+Portainer 图形化管理的脚本
- 精选10款超酷的HTML5/CSS3菜单
- Android Studio编译后安装apk报错:The APK file does not exist on
- first day
- 持续集成篇-- SonarQube代码质量管理平台的安装
- word2vec浅析
- 【备忘】使用 Docker Machine 创建虚拟机的脚本及参数
- BootStrap 模态框禁用ESC关闭、禁用点击空白处关闭
- Android进阶之路
- Swift-使用 R.swift 优雅的使用资源文件
- java数组元素倒序的三种方法
- Nginx + uwsgi + Django 简单上线配置
- weblogic项目可以没有web.xml文件?
- js学习笔记
- 如何在predix上构建使用postgresql服务的Java Webapp