Just when I thought I would relax.. someone messages me that Podman runs on FreeBSD!!!


Userlevel 7
Badge +22

After a long hard day I was going to watch the zombie box but this was not to be. Many years ago I worked a lot with FreeBSD and became a bit crazy (well that might have started earlier but my BSD addiction did not help). What started out as a work project to build a powerful Squid Proxy server turned into a situation where I was running FreeBSD with a desktop manager on my home computer. If you think getting new hardware to work on Linux back in the day was tough then you should have seen FreeBSD. Mind you once you got it going it was lightning fast. People swore that even Linux programs running in the emulator ran faster than on Linux. Either way it was fun and the Ports system for building applications meant that you could have your applications sculpted perfectly for your system. Then there were the FreeBSD jails! But that is another chroot story :) 

Fast forward to this evening and a LinkedIn message.. about Podman running on FreeBSD and.. there goes the evening!

I downloaded the latest version 14 and was pleasantly surprised about how little had changed in the setup. The job just gets done no stupid high graphics screens telling us “were just finishing almost done”. 

After the setup was done I realized there was no sudo so I went to the ports an build it 

cd /usr/ports/security/sudo

make install clean

The screen filled up with the magic that I used to enjoy so much:

Sudo built from the Ports

After adding my non root user to the sudo I brought up the Podman instructions from their website 

https://podman.io/docs/installation

Keep in mind this is still experimental on FreeBSD

pkg install podman

mount -t fdescfs fdesc /dev/fd

service podman enable

cp /usr/local/etc/containers/pf.conf.sample /etc/pf.conf

service pf enable
service pf start

echo 'pf_load="YES"' >> /boot/loader.conf
kldload pf
sysctl net.pf.filter_local=1
echo 'net.pf.filter_local=1' >> /etc/sysctl.conf.local
service pf restart

nat-anchor "cni-rdr/*"

zfs create -o mountpoint=/var/db/containers zroot/containers

sed -I .bak -e 's/driver = "zfs"/driver = "vfs"/' /usr/local/etc/containers/storage.conf

Finally it was time to test:

 

podman run --rm docker.io/dougrabson/hello
Pure Beauty!

 

Now it claims we can even get Linux containers running by using emulation! Fun wow!!

 

sudo sysrc linux_enable=YES
sudo service linux start

FreeBSD won’t let you run podman as a normal user so you have to use sudo:

sudo podman run -it --os=linux quay.io/quay/ubuntu bash
Wow

Ok it is getting late I have to stop but the fun just never ends!!


3 comments

Userlevel 7
Badge +20

Anything to keep the fun going eh. 😂

 

The first time I used freebsd was for a cluster at a University/College where it was used as a router/firewall. I was also running Squid with Dansguardian for Internet content filtering.

After that in 2000s on a job I went to do at Wyatt Pharma they used freebsd as DNS servers for a Novell Netware and eDirectory network. 

After that I have only seen it in enterprise storage (netapp ontap, dell isilon).

In fact the way NetApp ONTAP provides multi tenancy (vservers/svm) is through the FreeBSD jails

Good times those days!

Userlevel 7
Badge +22

DansGuardian.. great piece of software that is what I used with Squid as well to filter! 

Comment