Add support for vagrant-docker (#389)
* clean trailing ws in Vagrantfile and util/avr_setup.sh * replace triple quotes with heredoc. Ruby doesn't have triple quotes; that's a Python thing. This was just being parsed as multiple strings concatenated. * add docker support to Vagrantfile * make wants to find dfu-programmer in vagrant guestmaster
parent
6b8b332f77
commit
fd454e5b74
|
@ -62,6 +62,16 @@ Vagrant.configure(2) do |config|
|
|||
vmf.memory = "512"
|
||||
end
|
||||
|
||||
# Docker provider pulls from hub.docker.com respecting docker.image if
|
||||
# config.vm.box is nil. Note that this bind-mounts from the current dir to
|
||||
# /vagrant in the guest, so unless your UID is 1000 to match vagrant in the
|
||||
# image, you'll need to: chmod -R a+rw .
|
||||
config.vm.provider "docker" do |docker, override|
|
||||
override.vm.box = nil
|
||||
docker.image = "jesselang/debian-vagrant:jessie"
|
||||
docker.has_ssh = true
|
||||
end
|
||||
|
||||
# This script ensures the required packages for AVR programming are installed
|
||||
# It also ensures the system always gets the latest updates when powered on
|
||||
# If this causes issues you can run a 'vagrant destroy' and then
|
||||
|
@ -70,7 +80,7 @@ Vagrant.configure(2) do |config|
|
|||
|
||||
config.vm.provision "shell", run: "always", path: "./util/avr_setup.sh", args: "-update"
|
||||
|
||||
config.vm.post_up_message = """
|
||||
config.vm.post_up_message = <<-EOT
|
||||
Log into the VM using 'vagrant ssh' on OSX or from Git Bash (Win)
|
||||
or 'vagrant ssh-config' and Putty or Bitvise SSH or another SSH tool
|
||||
|
||||
|
@ -84,5 +94,5 @@ Vagrant.configure(2) do |config|
|
|||
cd /vagrant; cd keyboard; cd ergodox_ez; make clean; make
|
||||
|
||||
|
||||
"""
|
||||
EOT
|
||||
end
|
||||
|
|
|
@ -38,6 +38,7 @@ elif [[ -n "$(type -P apt-get)" ]]; then
|
|||
gcc-avr \
|
||||
binutils-avr \
|
||||
avr-libc \
|
||||
dfu-programmer \
|
||||
dfu-util
|
||||
|
||||
elif [[ -n "$(type -P yum)" ]]; then
|
||||
|
@ -55,6 +56,7 @@ elif [[ -n "$(type -P yum)" ]]; then
|
|||
avr-binutils \
|
||||
avr-gcc \
|
||||
avr-libc \
|
||||
dfu-programmer \
|
||||
dfu-util
|
||||
|
||||
elif [[ -n "$(type -P zypper)" ]]; then
|
||||
|
|
Loading…
Reference in New Issue