Skip to main content

Docker Compose to Pantavisor

Docker Compose orchestrates multiple containers on a single host, but it is a local tool: it does not deliver atomic OTA updates, roll back a failed deployment, or manage the base OS and kernel. On an embedded device that needs field updates, Compose is the app layer and nothing else. Pantavisor keeps the multi-container model and adds the device runtime around it — as PID 1, it manages the base, kernel, and apps as one signed, rollback-able revision.

See also: Pantavisor vs Docker — why Docker alone isn't enough for embedded firmware.

How the concepts map

Docker ComposePantavisorNotes
docker-compose.yml servicesContainers in a revisionEach service becomes a Pantavisor container.
image: referencepvr app add --from <image>Pulls the Docker/OCI image and converts it to an LXC container.
environment: / volumes:run.json env + _config/ overlaysPer-container settings live in the revision.
Docker bridge networkHost network or pv-xconnectContainers reach each other over the host namespace or the service mesh.
docker compose up (manual)pvr post / OTA via PantahubUpdates are atomic revisions, not an in-place restart.
(no rollback)Automatic health-gated rollbackA failed revision is restored on the next boot.
(host OS managed separately)BSP + kernel as containers in the revisionOne mechanism for the whole device.

Migration path

  1. Add each service as a container with pvr app add --from <image> --platform <arch>. See Install with the pvr CLI.
  2. Port environment variables and volumes into each container's run.json and the _config/ overlay tree. See Configure applications.
  3. Replace the Compose network with the host network namespace or pv-xconnect for container-to-container links.
  4. Build and flash a Pantavisor image for your target board (Build with Yocto, Install on hardware).

When Compose is still the right tool

If you are running containers on a server or workstation — not shipping an embedded device that needs field updates — Pantavisor is likely more than you need. Pantavisor's value is whole-device atomic updates, rollback, and base/BSP management for fielded hardware. For local development or cloud workloads, stay with Compose or a container orchestrator. See when not to use Pantavisor.