#!/usr/bin/env bash # Thin example: model/data container talks to host hthd via bind-mounted sockets only. # Do NOT map serial devices. Do NOT use --privileged. set -euo pipefail IMAGE="${1:-localhost/hth-client:dev}" # Observe-only (data people) podman run --rm -it \ --network=none \ --user 1000:1000 \ --security-opt no-new-privileges \ --volume /run/hth/observe.sock:/run/hth/observe.sock:ro \ "$IMAGE" \ python3 -c 'print("mount observe.sock only; never /dev/ttyUSB*")' # Control (model people) — still requires a Lease inside the app # podman run --rm -it \ # --network=none \ # --user 1000:1000 \ # --security-opt no-new-privileges \ # --volume /run/hth/observe.sock:/run/hth/observe.sock:ro \ # --volume /run/hth/control.sock:/run/hth/control.sock \ # "$IMAGE" python3 /app/control.py