logo
  • 教程列表
  • SO官方文档
  • 规定
    • 最小的设置
    • 启动并配置该框
    • 启动框而不进行配置
    • 提供一个运行框
    • Shell 配置器
    • 从文件运行 shell 脚本(不使用内联)
  1. StackOverflow 文档
  2. vagrant 教程
  3. 规定
  4. Shell 配置器

Shell 配置器

Created: November-22, 2018

shell 配置程序在配置时运行 shell 脚本。

$setup = <<SETUP
# You can write your shell script between here ...
sudo echo "Hello, World!" > /etc/motd.tail
# ... and here.
SETUP

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.provision "shell", inline: $setup
end
  • 从文件运行 shell 脚本(不使用内联)
  • 提供一个运行框

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明