This year I have been spending much of my time porting the github.com/containers stack to #FreeBSD. This is now available to install on FreeBSD-13.1 and later - just run 'pkg install podman-suite' to get all the pieces.
There are still a few rough edges but most of the core functionality is there including networking, image management, containers, pods and more. Take a look at #podman if you've been missing a docker-like #container engine on #FreeBSD.
@dfr good job
@dfr Oh! Do you have resources that describe how that fits with FreeBSD (on the top of my head is it agnostic of the usage of jails / bhyve or tied to one of these tools)?
Also, how does it compare to other tooling in the ports tree (e.g. iocage, bastille)?
I am currently in the process of replacing iocage which seems dead by something else. I am now looking into bastille which has some neat features but so far image creation looks "meh"… So I am still looking for alternatives
@smortex Right now its fairly tightly linked to jails although, with the addition of something like 9pfs, I think a bhyve OCI runtime is doable, similar to krun or runx.
Comparing to iocage or bastille, there is a strong focus on providing tools to separate function from state. For instance you can make a generic image for e.g. mysql and run a container based on that that keeps its state in a separate volume managed by podman.
@dfr are there docs for usage on FreeBSD?
@karinjiri @dfr what OCI runtime is this using? runj?
@karinjiri @fuzzykb This is using my own runtime, ocijail, mostly so I can work on better support for podman and buildah without hassling Samuel Karp all the time. When we start working on an OCI platform specification for FreeBSD, I expect both runtimes to be usable.
@karinjiri @dfr @fuzzykb I found podman documentation tricky because it all seems to assume a level of familiarity with docker and I never used docker. Would be nice if ocijail at least had a man page. I'll definitely try this out, regardless.
@okapi @karinjiri @fuzzykb I should probably write a manpage for ocijail but normally, you should not need to use it directly - its main function is as an abstraction layer, hiding most of the low-level container management from the high-level podman/buildah/cri-o engines.
It might be worth reading a few docker guides to cover the basic ideas, e.g. https://docker-curriculum.com - just substitute podman for docker and quay.io/dougrabson/freebsd-minimal for busybox.
@dfr @karinjiri @fuzzykb I'm getting an error trying to pull that image.
```
# podman pull quay.io/dougrabson/freebsd-minimal
Trying to pull quay.io/dougrabson/freebsd-minimal:latest...
Error: initializing source docker://quay.io/dougrabson/freebsd-minimal:latest: reading manifest latest in quay.io/dougrabson/freebsd-minimal: manifest unknown
```
Is there a source file for the construction of that initial image? In future, might it work for Linux images with the linuxulator?
@okapi @dfr @karinjiri I wrote up a way to run Linux containers using containerd and Samuel Karp's runj, but stuff like networking is still not supported
https://productionwithscissors.run/2022/09/04/containerd-linux-on-freebsd/
@okapi @karinjiri @fuzzykb I didn't set a 'latest' tag on that image. Try quay.io/dougrabson/freebsd-minimal:13. Scripts to build it are at github.com/dfr/freebsd-images.
@okapi @karinjiri @fuzzykb Also, I haven't tried to support running linux images - my main goal is for native FreeBSD image support.
@okapi @karinjiri @fuzzykb It turns out that it almost works - try 'sudo podman run --os=linux -ti --rm docker.io/alpine sh'.
Its missing linux /sys and /proc filesystems so things like ps don't work but probably not too hard to fix. Still way down the priority list though.
@karinjiri @fuzzykb Buildah is a lot more powerful than traditional Containerfile builds - I use it to build small freebsd images here: https://github.com/dfr/freebsd-images
@dfr kind of awesome. Thanks.
@dfr thank you so much! Gonna need to try it out once I'm at home!