virtualbox+vagrant学习-2(command cli)-6-vagrant init命令
Init——创建Vagrantfile文件
格式:
vagrant init [options] [name [url]]
通过创建初始的Vagrantfile文件(如果不存在的话),将当前目录初始化为vagrant环境。
userdeMacBook-Pro:~ user$ vagrant init -h
Usage: vagrant init [options] [name [url]] Options: --box-version VERSION Version of the box to add 添加的box的版本
-f, --force Overwrite existing Vagrantfile 复写已经存在的Vagrantfile文件
-m, --minimal Use minimal Vagrantfile template (no help comments). Ignored with --template
使用最小化的Vagrantfile模版(这种模版是没有帮助注释的),使用它将会忽视--template标签的使用
--output FILE Output path for the box. '-' for stdout box的输出路径,如果FILE为'-',意味输出的Vagrantfile将送到stdout
--template FILE Path to custom Vagrantfile template 定制Vagrantfile模版的路径
-h, --help Print this help 打印帮助信息
如果给出第一个参数,它将在创建的流浪者文件中预填充config.vm.box
如果给出第二个参数,它将在创建的Vagrantfile中预填充config.vm.box_url
例子:
创建基本的Vagrantfile:
$ vagrant init hashicorp/precise64
创建最小化的Vagrantfile文件 (无注释):
$ vagrant init -m hashicorp/precise64
创建新的Vagrantfile文件, 将当前路径下的覆盖:
$ vagrant init -f hashicorp/precise64
为来自指定box URL的执行box创建Vagrantfile文件:
$ vagrant init my-company-box https://boxes.company.com/my-company.box
创建一个Vagrantfile文件,对box进行版本限制:
$ vagrant init --box-version '> 0.1.5' hashicorp/precise64
virtualbox+vagrant学习-2(command cli)-6-vagrant init命令的更多相关文章
- virtualbox+vagrant学习-2(command cli)-17-vagrant ssh命令
SSH 格式: vagrant ssh [options] [name|id] [-- extra ssh args] 这将SSH导入正在运行的vagrant机器,并允许你访问机器的shell. us ...
- virtualbox+vagrant学习-2(command cli)-26-vagrant share命令
Share share命令初始化了一个vagrant share会话,允许你与世界上任何一个人共享vagrant环境,允许在几乎任何网络环境中直接在vagrant环境中进行协作. 你可以在本博客的vi ...
- virtualbox+vagrant学习-2(command cli)-1-vagrant box命令
vagrant box 这是用于管理(添加.删除等)boxes的命令. box 是一个打包好的操作系统,是一个后缀名为 .box 的文件,其实是一个压缩包,里面包含了 Vagrant 的配置信息和 V ...
- virtualbox+vagrant学习-2(command cli)-2-vagrant cloud命令--有问题
Cloud https://www.vagrantup.com/docs/cli/cloud.html 命令: vagrant cloud 这是用来管理与vagrant相关的任何东西的命令. 该命令的 ...
- virtualbox+vagrant学习-2(command cli)-7-vagrant login命令
Login ⚠️该命令已经弃用了,别名为vagrant cloud auth login.看本博客的 格式: vagrant cloud auth login [options] 登录命令用于使用Ha ...
- virtualbox+vagrant学习-2(command cli)-11-vagrant PowerShell命令
PowerShell 格式: vagrant powershell [-- extra powershell args] 这将在主机上打开PowerShell提示符,进入正在运行的vagrant机器. ...
- virtualbox+vagrant学习-2(command cli)-4-vagrant global-status命令
Global Status 格式: vagrant global-status 这个命令将告诉你当前登录的用户系统上所有活跃的vagrant环境的状态. userdeMacBook-Pro:~ use ...
- virtualbox+vagrant学习-2(command cli)-21-vagrant up命令
Up 格式: vagrant up [options] [name|id] 这个命令根据你的Vagrantfile文件创建和配置客户机. 这是“vagrant”中最重要的一个命令,因为它是创建任何va ...
- virtualbox+vagrant学习-2(command cli)-23-vagrant version命令
Version 格式: vagrant version options只有 -h, --help 该命令将告诉你已安装的vagrant版本以及当前可用的vagrant最新版本. userdeMacBo ...
- virtualbox+vagrant学习-2(command cli)-24-Aliases别名
Aliases 别名的部分灵感来自Git自身的别名功能,它允许你创建自己的定制vagrant命令,从而使你的vagrant体验更简单.更容易.更熟悉. 别名可以在VAGRANT_HOME/ alias ...
随机推荐
- hdu2036(多边形面积)
Description “ 改革春风吹满地, 不会AC没关系; 实在不行回老家, 还有一亩三分地. 谢谢!(乐队奏乐)” 话说部分学生心态极好,每天就知道游戏,这次考试如此简单的题目,也是云里雾里,而 ...
- 为什么说 LINQ 要胜过 SQL
如果你还没有沉溺于 LINQ,就会想这有啥大惊小怪的.SQL 并没有坏掉,为什么还要对它进行修补呢? 为什么我们还需要另外一种查询语言呢? 流行的说法是 LINQ 同 C#(或者 VB)集成在了一起, ...
- 不同CSS布局实现与文字鼠标选择的可用性——张鑫旭
by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=2401 一.文字选择的 ...
- 关于ie7下display:inline-block;不支持的解决方案
关于ie7下display:inline-block:不支持的解决方案 今天码的时候遇到这个问题了. 如果本身是内联元素的,把它的display属性设置设置为inline-block时,所有浏览器都是 ...
- js中闭包和作用域
将这方面很好的一系列文章:http://www.cnblogs.com/wangfupeng1988/p/3977987.html
- 用jquery实现带左右按键的轮播图
成品如下: 简单来说就是点击“右”按钮时,转换到右边的下一幅图片,同时上面的小方块颜色也跟着改变,如果已经是最后一幅图片,再点击“右”,则转换到第一幅图片,是直接向左移找到第一幅图的,明天再做一下无缝 ...
- lodop 二维码内容多少
QRCode最多能放181个汉字:LODOP.ADD_PRINT_BARCODE(248,6,60,60,"QRCode","一二三四五六七八九十二二三四五六七八九十三二 ...
- apache ftp server的外网访问问题
apache ftp server的外网访问简单配置点如下:
- JS DOM节点增删改查 属性设置
一.节点操作 增 createElement(name)创建元素 appendChild();将元素添加 删 获得要删除的元素 获得它的父元素 使用removeChild()方法删除 改 第一种方 ...
- clean-css
What is clean-css? Clean-css is a fast and efficient Node.js library for minifying CSS files. Accord ...