Runs NetBSD in emulation, using QEMU, so you can test easily on NetBSD. Inspired by madworx/netbsd.
Available on Docker Hub as vasi/netbsd. Source is on GitHub.
docker run --rm vasi/netbsd uname -a
docker run --rm --ti vasi/netbsd sh
docker run -p 127.0.0.1:2222:22 --rm -ti --name netbsd --device=/dev/kvm -e PUBKEY="$(ssh-add -L | head -n1)" -d vasi/netbsd
ssh -oStrictHostKeyChecking=no -p 2222 root@localhost
This is very similar to madworx/netbsd. The difference is that madworx's project boots from NFS, while this one uses a fork of Anita to auto-install NetBSD onto a virtual disk.
There are pros and cons to this approach:
Pros:
- More realistic/"normal" NetBSD installation
- Faster disk
- No weird NFS symptoms
Cons:
- Harder to change files in the VM
- Each Docker layer that changes the virtual disk snapshot has to copy the whole snapshot