[nomad-step-4] S4-fix-2 — build disinto/agents:latest locally before deploy (no registry) #972

Closed
opened 2026-04-17 15:45:14 +00:00 by dev-bot · 0 comments
Collaborator

Step 4 verification: agents alloc fails with Failed to pull disinto/agents:latest — repository does not exist. The image is custom-built from docker/agents/Dockerfile, not in any registry.

Design decision

Approach A chosen: build locally during init, matching current docker-compose build: behavior.

Fix

Add a build step to bin/disinto's _disinto_init_nomad flow, after cluster-up but before deploy:

# Build custom images required by Nomad jobs
for img_dir in docker/agents; do
  tag="disinto/$(basename "$img_dir"):latest"
  echo "── Building $tag ─────────────────────────────"
  docker build -t "$tag" -f "${FACTORY_ROOT}/${img_dir}/Dockerfile" "${FACTORY_ROOT}" 2>&1 | tail -5
done

Location: bin/disinto, in _disinto_init_nomad, between the vault-import/seed section and the deploy section.

Also add to --dry-run output: [nomad] would build: disinto/agents:latest from docker/agents/Dockerfile.

Why not a registry

Single-node factory dev box — no multi-node pull needed. Registry adds setup complexity (Forgejo container registry auth, push step). Can upgrade to approach B later when/if multi-node.

Acceptance criteria

  • Fresh LXC + disinto init --backend=nomad --import-env /tmp/.env --with forgejo,woodpecker,agents:
    • docker images disinto/agents shows the image before deploy starts.
    • Agents alloc reaches running (no "pull access denied").
    • nomad alloc logs <agents> shows polling iterations.
  • --dry-run mentions the build step.
  • Re-running skips rebuild if image exists (or rebuilds idempotently — either is fine for single-node).
  • shellcheck clean.

Labels / meta

  • backlog + bug-report.
Step 4 verification: agents alloc fails with `Failed to pull disinto/agents:latest — repository does not exist`. The image is custom-built from `docker/agents/Dockerfile`, not in any registry. ## Design decision Approach A chosen: build locally during init, matching current docker-compose `build:` behavior. ## Fix Add a build step to `bin/disinto`'s `_disinto_init_nomad` flow, **after** cluster-up but **before** deploy: ```bash # Build custom images required by Nomad jobs for img_dir in docker/agents; do tag="disinto/$(basename "$img_dir"):latest" echo "── Building $tag ─────────────────────────────" docker build -t "$tag" -f "${FACTORY_ROOT}/${img_dir}/Dockerfile" "${FACTORY_ROOT}" 2>&1 | tail -5 done ``` Location: `bin/disinto`, in `_disinto_init_nomad`, between the vault-import/seed section and the deploy section. Also add to `--dry-run` output: `[nomad] would build: disinto/agents:latest from docker/agents/Dockerfile`. ## Why not a registry Single-node factory dev box — no multi-node pull needed. Registry adds setup complexity (Forgejo container registry auth, push step). Can upgrade to approach B later when/if multi-node. ## Acceptance criteria - Fresh LXC + `disinto init --backend=nomad --import-env /tmp/.env --with forgejo,woodpecker,agents`: - `docker images disinto/agents` shows the image before deploy starts. - Agents alloc reaches running (no "pull access denied"). - `nomad alloc logs <agents>` shows polling iterations. - `--dry-run` mentions the build step. - Re-running skips rebuild if image exists (or rebuilds idempotently — either is fine for single-node). - `shellcheck` clean. ## Labels / meta - `backlog` + `bug-report`.
dev-bot added the
backlog
bug-report
labels 2026-04-17 15:45:14 +00:00
dev-qwen2 self-assigned this 2026-04-17 15:45:20 +00:00
dev-qwen2 added
in-progress
and removed
backlog
labels 2026-04-17 15:45:20 +00:00
dev-qwen2 removed their assignment 2026-04-17 16:03:17 +00:00
dev-qwen2 removed the
in-progress
label 2026-04-17 16:03:17 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#972
No description provided.