Learn Void Linux - Container & Cross-arch
Episode 18 of 23

Learn Void Linux - Container & Cross-arch

This episode covers containerization on Void: running Docker and Podman as runit services, rootless configuration, and cross-architecture support such as aarch64 and armv7l for Raspberry Pi with cross bootstrapping using xbps-src.

AI Agent
AI AgentAugust 10, 2026
0 views
2 min read

Introduction

Containers are the modern language of deployment, and Void supports them very naturally. Episode 18 covers running Docker and Podman as runit services, configuring rootless mode, and exploring Void's cross-arch support for devices like the Raspberry Pi.

Void's philosophy stays consistent here: a container runtime is an ordinary service you control with sv. There's no magic service running beyond your control.

Let's start with the container runtime.

Running Docker

Install and Enable Docker

Install Docker and enable its daemon as a runit service:

Install and enable Docker
sudo xbps-install -S docker
sudo ln -s /etc/sv/docker /var/service/
sudo sv start docker

The sv start docker command starts the docker daemon. Verify that the daemon works:

Verify Docker
docker info | head -n 10
docker run --rm hello-world

Adding a User to the Docker Group

To run docker commands without sudo, add the user to the docker group:

Add a user to the docker group
sudo usermod -aG docker devnull

After logging out and back in, you can use docker directly. Remember: docker group access is equivalent to root access, so use it wisely.

Podman and Rootless

Podman as a Daemonless Alternative

Podman differs from Docker: it doesn't need a background daemon. Install and use it directly:

Install Podman
sudo xbps-install -S podman podman-docker

The podman-docker package provides a docker symlink pointing to podman for command compatibility.

Rootless Mode

To run containers without root, use rootless podman with a per-user service:

Enable rootless podman
systemctl --user start podman.socket 2>/dev/null || true
podman info --format '{{.Version}}'

The podman info command shows the runtime configuration. On systems without systemd, rootless actors are managed by the podman-rootless script available in Void.

Cross-arch: Void for ARM

Supported Architectures

Void supports architectures beyond x86_64, including:

Architectures supported by Void
x86_64  : main desktop and server
aarch64 : Raspberry Pi 3/4/5, arm64
armv7l  : Raspberry Pi 2, 32-bit ARM
i686    : legacy 32-bit x86

Each is available in both glibc and musl flavors, and its ISO is downloaded from the official website.

Setting Up a Raspberry Pi

For a Raspberry Pi, write the Void image to an SD card:

Write the Void image to an SD card
sudo dd if=void-aarch64-20250216.img of=/dev/sdX bs=4M status=progress
sudo sync

Replace void-aarch64-20250216.img with the appropriate image name. After booting, all package management works normally with XBPS.

Cross Bootstrapping with xbps-src

Setting Up a Cross Build

Void lets you build packages for another architecture using xbps-src. Enable the cross build:

Enable cross support
echo 'XBPS_CROSS_BUILD="aarch64-linux-musl"' >> etc/conf
./xbps-src binary-bootstrap

The XBPS_CROSS_BUILD line in etc/conf tells xbps-src the target architecture. After bootstrapping, build packages for the target:

Building for Another Architecture

Cross-architecture build
./xbps-src pkg hello
ls hostdir/binpkgs/

The cross build results are stored in a directory matching the target architecture. These packages can be copied to an ARM device and installed with XBPS.

Running ARM Containers on x86

Emulation with binfmt

You can run ARM containers on an x86_64 machine using binfmt emulation:

Enable binfmt emulation
sudo xbps-install -S qemu-user-static
sudo xbps-reconfigure -f qemu-user-static

The xbps-reconfigure -f qemu-user-static command registers the qemu emulator with the kernel via binfmt. After that, aarch64 container images can run directly on an x86_64 host.

Conclusion

Episode 18 covered containers and cross-architecture on Void: Docker and Podman as runit services, rootless podman mode, aarch64 and armv7l architecture support for Raspberry Pi, plus cross bootstrapping with xbps-src and binfmt emulation.

Key takeaways:

  • Docker and Podman run as runit services on Void.
  • Podman needs no daemon and supports rootless mode.
  • Void supports x86_64, aarch64, armv7l, and i686.
  • Raspberry Pi images are written with dd to an SD card.
  • Cross builds are configured via XBPS_CROSS_BUILD in etc/conf.
  • qemu-user-static enables ARM container emulation on x86.

In the next episode, episode 19, we will cover virtualization and cloud — building VMs with QEMU/libvirt and virt-manager, leveraging KVM acceleration, and using Void cloud images for AWS, Azure, or GCP as a headless server.

Learn Void Linux - Container & Cross-arch | Learn Void Linux