Since I spent some time figuring out all of the pieces to this, I thought
I'd share it so somebody else doesn't have to.

My goal was to build my custom debian live ISO with a GitHub action and
automatically push it (wrapped in a Docker image) to the GitHub container
registry (ghcr.io).

First, here's my workflow:
https://github.com/mmguero/deblive/blob/master/.github/workflows/iso-build-docker-wrap-push-ghcr.yml

Nothing too complicated there. Installing dependencies for and then
cloning live-build.git
and building the .deb packages to install in the GitHub workflow
environment.

The GitHub workflow calls my build.sh script (
https://github.com/mmguero/deblive/blob/master/build.sh) which does a
little bit of setup but is essentially just a wrapper for "lb config" and
"lb build" and which produces the .iso file.

The next question I had to answer was "Okay, now I have an ISO file, what
am I going to do with it?" I wanted to be able to have the ISO
automatically uploaded somewhere I could access from anywhere. Since I'm
already using GitHub's container registry for my docker images, I thought
"I wonder if there's a slick way I can wrap this puppy in a docker image
that I can 1) run on the fly and 2) download the raw ISO image itself?"

That lead me to create this project, "docker-qemu-live-iso" (
https://github.com/mmguero/docker-qemu-live-iso) which is an docker image
that accomplishes those two goals: 1) it runs the live ISO image inside of
qemu (accessible via a native VNC client and/or accessible via noVNC, an
HTML5 VNC client), and 2) it surfaces a simple HTTP server from which the
ISO itself can be downloaded. The behavior of this container can be
customized with environment variables.

Using docker-qemu-live-iso as a base layer, the Dockerfile that lives with
my custom debian live ISO (
https://github.com/mmguero/deblive/blob/master/docker/Dockerfile) simply
replaces the tiny dummy ISO with the finished project of the workflow and
then the workflow pushes it to ghcr.io.

So, with a single "run workflow" click (and some patience while it builds)
I end up with a fresh build of my ISO, built and hosted by GitHub without
having to use a local build environment at all.

Anyway, I hope at some point this is useful to somebody. Cheers!

-SG

--
Seth Grover

Be kind to all of your neighbors
Because they're just like you.
And you're nothing special
Unless they are too.

Reply via email to