I like distrobuilder but I was looking for an easy way to modify the image before I export it.
I used debootstrap before, so I did chroot the folder to run my custom bash script.
That doesn’t seem to work anymore.
Bash wasn’t installed, that was an easy fix, however the container had zero network connectivity.
So my attempt didn’t succeed.
This is my script.
cat << OUTEREOF | sudo chroot /home/images/build/$folder
I run my code in here…
OUTEREOF
If all you want to do is manipulate some files in the image you could use distrobuilder to create the root filesystem as a directory, modify the contents of the directory, then use distrobuilder to create the image.
This is what I do. I add a few configuration files and binaries this way.
I don’t think that’s the case for me.
I have to build multiple images, with a different version of a software.
Its easier to just pipe them through a bash script.
Instead of making a yaml for every single version.
Seems like I use the way @jarrodu suggested, downloading and preparing the files outside of the container, then copying them in, doing the rest inside with a bash, to prepare it and let distrobuilder finish the image.