NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Running docker containers with podman (on NetBSD!)

On Sat, Sep 4, 2021 at 14:04 <> wrote:
Hi all,

I added a package to pkgsrc called Podman.
It's a tool for running OCI containers, and it has the same command line
behaviour as the docker command line argument.

There are some selling points for it over docker, but the most important
for us is the fact it has a mode where it spawns a Linux VM to talk to
for you, so it runs on NetBSD!

One caveat is that NetBSD somewhat struggles running virtualized Linux
by default. The virtualized ticks are just too slow, so it panics with:
  Kernel panic - not syncing: IO-APIC + timer doesn't work! Boot with
  apic=debug and send a report. Then try booting with the 'noapic' option.

One way to work around it, convenient for this purpose, is to rebuild
your kernel with "options HZ=1000" added, then you don't need to edit
the command line arguments in the VM.

Usage instructions:
Install pkgsrc/sysutils/podman from pkgsrc-current
Initialize and start a VM with:
podman machine init
podman machine start

And then you can use it much like the docker command:
> podman run -it alpine sh -c "apk add file; file -L /bin/sh"
) Installing libmagic (5.40-r1)
(2/2) Installing file (5.40-r1)
Executing busybox-1.33.1-r3.trigger
OK: 13 MiB in 16 packages
/bin/sh: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/, stripped

This is awesome, thank you!

Is there room for a separate PODMAN kernel config that just includes GENERIC and then sets the frequency?

Home | Main Index | Thread Index | Old Index