-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlkd_Vagrantfile_ubuntu
35 lines (25 loc) · 1.29 KB
/
lkd_Vagrantfile_ubuntu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "generic/ubuntu2104"
config.vm.box_version = "3.6.14"
config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: "*.qcow2"
config.vm.provider "libvirt" do |lv|
lv.memory = "8192"
end
config.vm.provision "shell", inline: <<-SHELL
hostnamectl set-hostname $(cat /etc/hostname)
apt-get update && apt-get upgrade -y
apt-get install -y ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
apt-get install -y build-essential rsync git qemu-system-x86 debootstrap bc openssl libncurses-dev gawk flex bison libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf
systemctl start docker
cp -r /vagrant /test
cd /test
sed -i -e '/--user.*/d' -e '/^\s+$/d' -e "s#/home/dbg/#/root/#" lkd_debug.sh
./lkd_init.sh
SHELL
end