Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
dc69333054 |
@@ -1,10 +1,9 @@
|
||||
.PHONY: install clean
|
||||
.PHONY: base vagrant clean
|
||||
|
||||
HEADLESS ?= true
|
||||
|
||||
default: install
|
||||
|
||||
install: base
|
||||
default:
|
||||
@echo "Please run 'make base' or 'make vagrant'"
|
||||
|
||||
base:
|
||||
PKR_VAR_headless="$(HEADLESS)" packer build x86_64-qemu-base.pkr.hcl
|
||||
|
16
debian-13/scripts/clean.sh
Normal file
16
debian-13/scripts/clean.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eux
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get clean -y
|
||||
apt-get autoclean -y
|
||||
rm -f /var/lib/dhcpcd/*
|
||||
rm -rf /var/cache/apt/archives/*
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
rm -rf /var/tmp/* /var/tmp/.[!.]*
|
||||
|
||||
truncate -s 0 /var/log/wtmp
|
||||
|
||||
dd if=/dev/zero of=/EMPTY bs=1M || true
|
||||
sync
|
||||
rm -rf /EMPTY
|
@@ -70,6 +70,7 @@ build {
|
||||
provisioner "shell" {
|
||||
scripts = [
|
||||
"scripts/aptupdate.sh",
|
||||
"scripts/clean.sh"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ source "qemu" "debian-13-64-vagrant" {
|
||||
iso_url = "builds/qemu/debian-13-64-base/debian-13-64-base"
|
||||
disk_image = true
|
||||
iso_checksum = "none"
|
||||
output_directory = "builds/qemu/debian-13-64-vagrant"
|
||||
output_directory = "builds/qemu"
|
||||
shutdown_command = "/usr/bin/systemctl poweroff"
|
||||
disk_interface = "virtio"
|
||||
disk_size = var.disk_size
|
||||
@@ -39,7 +39,7 @@ source "qemu" "debian-13-64-vagrant" {
|
||||
ssh_username = "root"
|
||||
ssh_password = var.ssh_password
|
||||
ssh_timeout = "60m"
|
||||
vm_name = "debian-13-64-base"
|
||||
vm_name = "debian-13-64-vagrant"
|
||||
net_device = "virtio-net"
|
||||
boot_wait = "5s"
|
||||
}
|
||||
@@ -50,7 +50,8 @@ build {
|
||||
|
||||
provisioner "shell" {
|
||||
scripts = [
|
||||
"scripts/vagrant.sh"
|
||||
"scripts/vagrant.sh",
|
||||
"scripts/clean.sh"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user