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

  • 關於本站
  • 免責聲明