Question about ublue-os image template

Hello,

I have just discovered the ublue-os image template and am going to play around with it to build my own customized image. I’m talking about this one.

However I have a question about this. Currently I’m using homebrew to not have to layer any packages. Would it be a good idea to add the packages I have currently installed through home to my customized image therefore not needing to use brew anymore. Or is that the power of using homebrew, that you don’t need to updated to a new image to install or remove something from there?

This is personal preference.

I prefer to always have my CLI tools up to date and brew does that really well, but if you prefer the distro packages you can just add them to your image.

1 Like

Thanks! That sounds logical! Another question, does my Github repo for my image build need to be public for the push of my image to the ghcr to work?

And how does the workflow pickup on a new image build, for example when Silverblue pushes new update, so that my repo workflow builds a new image to push to ghcr?

Not sure, I’ve only done public images.

You’d have to build something to monitor the upstream image, notice when it changes and then kickoff a build (I wish we had this!). Instead we just cron our builds to start after fedora, so they refresh once a day.

1 Like

Do you mean you have a build system where you have a cronjob running that uses github-cli to build a new image once a day? I’m assuming that would mean I would have to do something similar for my custom image repo?

That seems to work. Thanks answer my questions. Looks like I have my own custom image now! :slight_smile:

yeah if you look at the build file it has sections for when to publish: image-template/.github/workflows/build.yml at 90c3f2c60a127e440e94d621e65fb8aee14dcc92 · ublue-os/image-template · GitHub

Lines 4-14. It will do a build when you do a pull request, a schedule, and when you push to main. workflow_dispatch adds a button so you can build on demand:

1 Like

That’s cool!

I setup a cronjob using github-cli to build a new image for me once a day, looks something like this.
/bin/gh workflow run build-ublue-custom

I have two more questions.

  1. Is there any good reason to keep the “Package silverblue-main · GitHub” image pinned since I pinned it in case my custom image would fail to boot.
  2. Can you give me some ideas of how I could customize my own image more, currently I only added the packages(in build.sh) I had layered in the ublue-os/silverblue-main image before.

I would just keep using either :latest or a version number like :41. In real world production the mantra is always to pin to a hash so you can gate your own updates, but that gets annoying quickly in desktop land. If you’ve pinned to a specific image then that’s a bad idea because it won’t be getting security updates.

Can you give me some ideas of how I could customize my own image more, currently I only added the packages(in build.sh) I had layered in the ublue-os/silverblue-main image before.

This is up to you. I started with a few packages. Then I added my favorite wallpapers. Then I got my friends to help. Then we added more things. Then I got an artist to make us more wallpapers. Then we decided to add nvidia drivers. Then we added a bunch of other things. That’s how Bluefin ended up happening.

The sky’s the limit – my only recommendation is to use it, add what you need, and just test drive it as you add. Sometimes less is indeed more,. The super dope part is if you don’t like something you can remove it, you can grow and shrink depending on what you need, so if you decide to add half the Fedora repo and you change your mind, you can remove it and your client machine will be fine, there’s no need to go back and “clean up” since your image is built from scratch each time.

What I meant was I kept the defaults mentioned in the “Containerfile”, so FROM being this(but with variables).
FROM ghcr.io/ublue-os/silverblue-main:latest

I built my own image from my own repo using the instructions from the ublue-os template repo. I was using the ublue-os image before I built my own custom image. So this is the one I currently have pinned.
ghcr.io/ublue-os/silverblue-main:latest

Is it useful to keep that one pinned when using my own custom built image, that’s using the same source as the ublue-os/silverblue-latest?

I’ll have to think about that for a bit, curren’t I got the most import packages installed and the rest are installed using Brew and Flatpak and I have zero packages layered now with my custom image :sunglasses:

Thanks for your help!

Keep it silverblue-main:latest, hold what you’ve got, you’ll be good to go!

1 Like

I have been having fun customizing my image a bit. Just running into something I haven’t figured out yet.

I’ve been trying to install “system” Flatpaks by adding “flatpak --system install name -y” to build.sh. But during the image build but that seems to fail each time when. Is there any documentation about that on how to do that?

There’s currently no method for flatpaks to be installed via a containerfile. You can add them to the ISO via the action though:

Thanks! I ended up going back to the image provided by Universal Blue, silverblue-main.

I found myself playing around the entire day with creating a better image, it was one reason why I left Arch Linux because I don’t want to tweak around and try and perfect my whole setup each time I find a new toy. It was fun and I learned a bit, I’ll just stick to the ublue silverblue-main image and the 4 packages and dependencies I had layered before, it works for me.

Maybe I’ll get back to it another time again. Thanks for having answered my questions and for your time @j0rge !

1 Like