WIP: run-in-vagrant
This commit is contained in:
35
Vagrantfile
vendored
35
Vagrantfile
vendored
@ -12,7 +12,10 @@ Vagrant.configure("2") do |config|
|
||||
|
||||
# Every Vagrant development environment requires a box. You can search for
|
||||
# boxes at https://vagrantcloud.com/search.
|
||||
config.vm.box = "bento/ubuntu-16.04"
|
||||
# config.vm.box = "bento/ubuntu-16.04"
|
||||
config.vm.box = "ubuntu/impish64"
|
||||
|
||||
# config.vm.box = "ubuntu/xenial64"
|
||||
|
||||
# Disable automatic box update checking. If you disable this, then
|
||||
# boxes will only be checked for updates when the user runs
|
||||
@ -31,7 +34,7 @@ Vagrant.configure("2") do |config|
|
||||
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
|
||||
|
||||
# Create a private network, which allows host-only access to the machine
|
||||
# using a specific IP.
|
||||
# using a specific IP
|
||||
# config.vm.network "private_network", ip: "192.168.33.10"
|
||||
|
||||
# Create a public network, which generally matched to bridged network.
|
||||
@ -39,7 +42,7 @@ Vagrant.configure("2") do |config|
|
||||
# your network.
|
||||
config.vm.network "public_network"
|
||||
|
||||
config.ssh.forward_x11 = true
|
||||
# config.ssh.forward_x11 = true
|
||||
config.ssh.forward_agent = true
|
||||
|
||||
# Share an additional folder to the guest VM. The first argument is
|
||||
@ -55,11 +58,11 @@ Vagrant.configure("2") do |config|
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
# Display the VirtualBox GUI when booting the machine
|
||||
# vb.gui = true
|
||||
vb.customize [
|
||||
"modifyvm", :id,
|
||||
"--audio", "coreaudio",
|
||||
"--audiocontroller", "hda"
|
||||
]
|
||||
# vb.customize [
|
||||
# "modifyvm", :id,
|
||||
# "--audio", "coreaudio",
|
||||
# "--audiocontroller", "hda"
|
||||
# ]
|
||||
|
||||
# Customize the amount of memory on the VM:
|
||||
vb.memory = "1024"
|
||||
@ -71,9 +74,15 @@ Vagrant.configure("2") do |config|
|
||||
# Enable provisioning with a shell script. Additional provisioners such as
|
||||
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
|
||||
# documentation for more information about their specific syntax and use.
|
||||
# config.vm.provision "shell", inline: <<-SHELL
|
||||
# apt-get update
|
||||
# apt-get install -y apache2
|
||||
# SHELL
|
||||
config.vm.provision "shell", path: "install.sh", privileged: true
|
||||
config.vm.provision "shell", inline: <<-SHELL
|
||||
apt-get update
|
||||
apt install docker.io
|
||||
systemctl enable --now docker
|
||||
systemctl status docker
|
||||
sudo groupadd docker
|
||||
sudo usermod -aG docker $USER
|
||||
docker --version
|
||||
docker run hello-world
|
||||
SHELL
|
||||
# config.vm.provision "shell", path: "install.sh", privileged: true
|
||||
end
|
||||
|
Reference in New Issue
Block a user