1 # One control container and the sibling engine container that it starts.2 #3 # Compose owns the control only. The control holds the rootless Docker socket4 # and starts the bundle image as a sibling; the engine is not a compose5 # service, because its lifetime follows the control's supervisor (D28).6 #7 # Before the first `up`, build the mock bundle image. The pipeline tags the8 # stable local alias that deploy.toml names:9 #10 # ./ops/images.sh build mock/x64-cpu11 #12 # The control image has no plugin binary and no engine library. The engine13 # image has the plugin; its only host mount is the one private socket14 # directory that the supervisor creates.15 services:16 inf3r:17 build:18 context: ..19 dockerfile: docker/Containerfile20 target: control21 pull: false22 image: ${INF3R_CONTROL_IMAGE:-inf3r:compose}23 user: "0:0"24 read_only: true25 cap_drop:26 - ALL27 security_opt:28 - no-new-privileges:true29 ports:30 - "${INF3R_PORT:-8080}:8080"31 environment:32 DOCKER_HOST: unix://${INF3R_DOCKER_SOCKET:-/run/user/1000/docker.sock}33 INF3R_IMAGES_LOCK: /opt/inf3r/images.lock34 volumes:35 # The deploy file stays on the host and is read-only. It contains no36 # engine library and no bundle source.37 - ${INF3R_CONFIG_DIR:-./config}:/etc/inf3r:ro38 # Manifests for bundles other than the mock. The directory is39 # manifest-only: no plugin binary, engine library, engine tree, or40 # weight. `ops/control-manifests.sh` stages it.41 - ${INF3R_MANIFEST_DIR:-../docker/manifests}:/opt/inf3r/plugins-extra:ro42 # The image lock is the build record that the server checks before it43 # starts a sibling. It is read-only and is not visible to an engine.44 - ${INF3R_IMAGES_LOCK_FILE:-../target/images.lock}:/opt/inf3r/images.lock:ro45 # The ledger, the blob store, and the generated token outlive the46 # container. The first token is written here, never into an image.47 - inf3r-state:/var/lib/inf3r48 # The control's socket root is a host directory so the sibling engine can49 # mount its own instance directory by the same host path. The deploy file50 # names the same host root as socket_host_dir.51 - ${INF3R_RUN_HOST_DIR:-/run/user/1000/inf3r}:/run/inf3r:rw52 # Rootless Docker's socket and the CLI that talks to it. Neither is53 # mounted into an engine.54 - ${INF3R_DOCKER_SOCKET:-/run/user/1000/docker.sock}:${INF3R_DOCKER_SOCKET:-/run/user/1000/docker.sock}:rw55 - /usr/bin/docker:/usr/local/bin/docker:ro56 tmpfs:57 - /tmp58 healthcheck:59 # Ask the same route a client asks. The endpoint needs no token, and the60 # cli exists in both the development and the distroless release image.61 test: ["CMD", "/usr/local/bin/inf3r", "healthz", "--tcp", "127.0.0.1:8080"]62 interval: 5s63 timeout: 3s64 retries: 1265 start_period: 30s66 stop_grace_period: 40s67 68 volumes:69 inf3r-state: