Skip to main content

Set Up PpRx in a Docker Container

Phase 4 of 6Advanced tutorials

Learn how to run PpRx inside a Docker container while keeping the RadioLion kernel module and license setup on the host.

Overview

PpRx can run inside a Docker container, with the install directory mounted from the host. This keeps the installed files, RadioLion kernel module, and license checkout on the host filesystem, so they persist across container rebuilds, while PpRx itself executes inside the container.

Installation and RadioLion kernel setup happen on the host, outside the container. License checkout happens inside the container, since that reflects the actual runtime environment PpRx will execute in.

note

Ensure the Docker image's Ubuntu version is at or above the host computer's Ubuntu version.

warning

A dockerized PpRx install is CLI-only. The Locus Lock GUI is not available inside the container. Only the CLI specific sections of the tutorials will be applicable.

Steps

  1. On the host, run the install script with the --docker flag. Note the install location, since it's needed for the container mount in a later step.

    bash -c "$(curl -fsSL https://install.locuslock.com/installer.sh)" --docker

    The --docker flag skips the license-checkout prompt during install; license checkout happens later, from inside the container.

  2. Set up the RadioLion kernel module on the host:

    cd <locus-lock-directory>
    cd src/front-end/radiolion-r2/scripts
    ./reload_femodule.bash

    Verify that two RadioLion device nodes are present:

    ls /dev/rad*
  3. Save the following as docker-compose.yml, updating the bind mount source to point to your actual locus-lock install directory from step 1:

    services:
    locuslock:
    container_name: locuslock
    image: ubuntu:24.04

    post_start:
    - command: >
    sh -c '
    apt-get update &&
    apt-get install -y curl ca-certificates
    '

    environment:
    - PATH=/home/locus-lock/src/bin:$PATH

    network_mode: host

    volumes:
    - type: bind
    source: /home/ubuntu/locus-lock # <-- change this to whatever the install path on the host is
    target: /home/locus-lock

    - type: bind
    source: /etc/machine-id
    target: /etc/machine-id
    read_only: true

    devices:
    - /dev/radiolion0:/dev/radiolion0
    - /dev/radiolion1:/dev/radiolion1

    entrypoint: ["sleep", "infinity"]
    tip

    Persisting the install directory across container rebuilds, whether through this bind mount or a dedicated Docker volume, matters: it's what keeps a checked-out license valid instead of requiring a new checkout after every rebuild.

    note

    The /etc/machine-id bind mount is optional, but including it gives PpRx's license checkout more information to identify the machine.

  4. Start the Docker container:

    sudo docker compose up -d
  5. Check out a license from inside the container:

    docker exec -it -w /home/locus-lock/src/license-management locuslock ./checkout_license

    checkout_license prompts for a Customer ID or License ID. See License Management for the difference between the two.

    note

    Docker containers have a weak hardware ID. A license checked out here must check in again (by re-running checkout_license) at least once every 30 days, and is intended for development use only. See License Check-Ins.

  6. PpRx is now ready to run within the container.

Why License Checkout Happens Inside the Container

Running checkout_license from inside the container, rather than during the host-side install in step 1, ensures the license reflects the actual runtime environment PpRx executes in. Performing the rest of the install (steps 1–2) on the host keeps a persistent local file structure across container rebuilds, and ensures the RadioLion kernel module is set up correctly on the host it's physically connected to.