- # 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
- # add a # before ,args: and run 'vagrant up' to get a working
- # non-updated box and then attempt to troubleshoot or open a Github issue
-
- config.vm.provision "shell", run: "always", path: "./util/install_dependencies.sh", args: "-update"
+ # Unless we are running the docker container directly
+ # 1. run container detached on vm
+ # 2. attach on 'vagrant ssh'
+ ["virtualbox", "vmware_workstation", "vmware_fusion"].each do |type|
+ config.vm.provider type do |virt, override|
+ override.vm.provision "docker" do |d|
+ d.run "qmkfm/base_container",
+ cmd: "tail -f /dev/null",
+ args: "--privileged -v /dev:/dev -v '/vagrant:/vagrant'"
+ end
+
+ override.vm.provision "shell", inline: <<-SHELL
+ echo 'docker restart qmkfm-base_container && exec docker exec -it qmkfm-base_container /bin/bash -l' >> ~vagrant/.bashrc
+ SHELL
+ end
+ end