Buildah in Silverblue

Hi,

I’m just loving Silverblue and trying my best to keep the ostree pristine, and everything I do in containers.

I’m playing around with buildah now. If I want to ’buildah from scratch ’ then normally I would be running dnf from the host to get stuff into my working-container, But dnf is not available on the base os. Do I have to make a container and install buildah along side of dnf??? Is there some other work around that I am not seeing? Thanks!

1 Like

You can try running dnf from inside the toolbox.

2 Likes

:frowning:

(I have the default toolbox loaded with apps and packages for LaTeX and Python, Jupyter Lab and so on. I think that it’s possible to commit the container and somehow make it portable to any OS. But if buildah is useless in Fedora Silverblue perhaps it would be more convenient for me to run such container from a conventional Fedora Workstation or KDE with the working apps running in a container. I am a bit misled)

[samuel@toolbox ~]$ Elara=$(buildah from scratch) 
⬢[samuel@toolbox ~]$ scratchmnt=$(buildah mount $Elara)
cannot mount using driver overlay in rootless mode. You need to run it in a `buildah unshare` session
⬢[samuel@toolbox ~]$ sudo su
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
⬢[root@toolbox samuel]# scratchmnt=$(buildah mount $Elara)
kernel does not support overlay fs: 'overlay' is not supported over <unknown> at "/var/lib/containers/storage/overlay": backing file system is unsupported for this graph driver

I could not make a scratch container using Buildah inside a toolbox. How I did it was layer dnf on the host then build a container from scratch on the host. This only works as root though. I am not sure it this is the correct way of doing this. Still learning about containers and Silverblue.

Gordy.

I have used this and works

https://blog.christophersmart.com/2020/04/18/making-dnf-on-fedora-silverblue-a-little-easier-with-bash-aliases/