I've been hacking my way through building vagrant boxes in unprivileged containers. It works. Barely but it works. I can end up with a functional vagrant box with `make stretch`. The only place where I need `sudo` is when we tar up the root fs because it doesn't belong to the same UID.
15 lines
221 B
Bash
Executable file
15 lines
221 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
echo "Cleaning up"
|
|
|
|
rm /envdump /script.sh
|
|
|
|
echo 'Removing temporary files...'
|
|
rm -rf /tmp/*
|
|
|
|
echo 'cleaning up dhcp leases'
|
|
rm -f /var/lib/dhcp/*
|
|
|
|
echo 'Removing downloaded packages...'
|
|
apt-get clean
|