mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
msb caches images by reference and pull without --force never contacts the registry, while attestation compares the reference string. A floating tag therefore keeps a stale guest image forever and still passes attestation. Pinning the default to the published index digest makes IfMissing pull the new image and forces the running microVM to be recreated on deploy.
32 lines
1.3 KiB
YAML
32 lines
1.3 KiB
YAML
# Agent Sandboxing overlay (microsandbox / msb)
|
|
# Grants the container KVM access and persists microsandbox state so OpenCode
|
|
# agent commands can run inside a microVM. Linux host with /dev/kvm required.
|
|
# Use with: docker compose -f docker-compose.yml -f docker-compose.sandbox.yml up -d
|
|
#
|
|
# This overlay deliberately does NOT use `privileged: true`. It grants only
|
|
# /dev/kvm (microVM execution), /dev/net/tun and NET_ADMIN (guest networking
|
|
# for SANDBOX_NET=public). If msb reports a missing device or capability on a
|
|
# particular host, add that specific entry rather than enabling full privilege.
|
|
|
|
services:
|
|
app:
|
|
devices:
|
|
- "/dev/kvm:/dev/kvm"
|
|
- "/dev/net/tun:/dev/net/tun"
|
|
cap_add:
|
|
- NET_ADMIN
|
|
environment:
|
|
- SANDBOX_IMAGE=${SANDBOX_IMAGE:-docker.io/cstechdev/ocm-sandbox@sha256:74a9f12e1c1768e36bc159c4c7efb70ab9c47da5f46f93763ddb282dd58ad79c}
|
|
- SANDBOX_MEMORY=${SANDBOX_MEMORY:-4G}
|
|
- SANDBOX_CPUS=${SANDBOX_CPUS:-2}
|
|
- SANDBOX_EXEC_USER=${SANDBOX_EXEC_USER:-${PUID:-1000}}
|
|
- SANDBOX_NET=${SANDBOX_NET:-public}
|
|
- SANDBOX_START_TIMEOUT_MS=${SANDBOX_START_TIMEOUT_MS:-300000}
|
|
- SANDBOX_EXEC_TIMEOUT_MS=${SANDBOX_EXEC_TIMEOUT_MS:-600000}
|
|
volumes:
|
|
- microsandbox-data:/home/node/.microsandbox
|
|
|
|
volumes:
|
|
microsandbox-data:
|
|
driver: local
|