NetBSD-Users archive

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

Running docker containers with podman (on NetBSD!)



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"
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/2) 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/ld-musl-x86_64.so.1, stripped


Home | Main Index | Thread Index | Old Index