Pelican in a Toolbox

A while ago I upgraded to Fedora 33. I normally just do a system upgrade but this time I went for the nuke & pave approach. Doing a proper clean-out makes me feel better, and as an added bonus I got Fedora with Btrfs. Over the last few years I've been playing with openSUSE quite a bit, mainly because of the file system. Btrfs on Fedora 33 is somewhat basic in comparison – there's no Snapper – but that actually suits me fine. I'm not a Btrfs expert and I view this as a gentle introduction.

One of the annoying things with Fedora system upgrades is that containers inside Toolbox tend to break. The local copy of this site runs inside Toolbox and I wasn't quite sure how I would get my local development environment back. It turns out it's dead easy.

Creating a new container

The first thing to do is installing Toolbox, as it's not installed by default:

# dnf install toolbox

Next, we need a container:

$ toolbox create --container
Image required to create toolbox container.
Download (500MB)? [y/N]: y
Created container:
Enter with: toolbox enter

$ toolbox list
IMAGE ID      IMAGE NAME                                        CREATED
af1f279fed20  3 weeks ago

5d9d9b0e8e7d  47 seconds ago  configured

Perform magic in the new container

You can now simply enter the container; navigate to the website directory (in my case ~/sites/ and make sure Pelican is up to date:

$ toolbox enter
• $ cd sites/
• $ python -m pip install --upgrade pelican
• $ pelican content -s
Done: Processed 11 articles, 0 drafts, 1 page, 0 hidden pages and 0 draft pages in 0.15 seconds.
• $ pelican --autoreload --listen
Serving site at: - Tap CTRL-C to stop

And that's it – everything is working as expected. I'm pretty terrified of containers but I suddenly feel I might one day take to these container-based workflows…