Skip to content

Fixed a bug and added some new features - #17

Merged
marcepartment merged 4 commits into
mainfrom
feature/more-new-features
Oct 7, 2026
Merged

marcepartment merged 4 commits into
mainfrom
feature/more-new-features

Conversation

@marcepartment

Copy link
Copy Markdown
Collaborator

No description provided.

marcepartment and others added 3 commits September 30, 2026 11:43
… superseded images

roll shutdown runs roll env down in every environment with a running
container and then roll svc down, for the end of the working day. Volumes
are kept. An environment whose .env.roll no longer carries the name it was
started under is left running and reported.

roll image-cleanup removes superseded roll images (the untagged previous
build a pull leaves behind) and tagged roll images no container uses. The
superseded half also runs automatically after svc pull|up and env pull|up
(ROLL_IMAGE_AUTO_CLEANUP=0 turns it off); unused images are never removed
automatically, so a shutdown does not cause re-downloads and parallel builds
cannot delete each other's freshly pulled images. Only images roll runs are
touched and removal never forces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… keys in FEATURE-REQUESTS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Superseded-image detection currently misses normal dangling images, and cleanup patterns can target unrelated repositories.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity · 1 Low severity

Open (4)
What changed in this PR

Adds host-wide shutdown and image-cleanup workflows while fixing database input handling.

Changes:

  • Adds manual and automatic Docker image cleanup.
  • Adds roll shutdown for all environments and core services.
  • Prevents database binary probing from consuming redirected stdin.
File Description
utils/​images.sh Implements image discovery, classification, and cleanup.
utils/​config.sh Registers automatic-cleanup configuration.
README.md Documents commands and troubleshooting.
FEATURE-REQUESTS.md Records remaining configuration and environment gaps.
docs/​usage.md Documents shutdown and image cleanup.
docs/​configuration/​unattended-operation.md Documents unattended automatic cleanup.
commands/​usage.help Lists the new commands.
commands/​svc.cmd Runs cleanup after service pull/up.
commands/​shutdown.help Defines shutdown help text.
commands/​shutdown.cmd Implements host-wide shutdown.
commands/​image-cleanup.help Defines cleanup help text.
commands/​image-cleanup.cmd Implements manual cleanup and dry runs.
commands/​env.cmd Runs cleanup after environment pull/up.
commands/​db.cmd Preserves stdin and handles non-TTY connections.
CHANGELOG.md Records unreleased functionality and fixes.
bin/​roll Passes cleanup flags through dispatch.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread utils/images.sh Outdated
Comment on lines +414 to +415
| sed -e 's/[$][{][^}]*[}]/*/g' -e 's/@.*$//' -e 's/:.*$//' \
| grep -v '^$' || true
Comment thread commands/shutdown.cmd Outdated
Comment on lines +41 to +42
## a compose project roll did not start
[[ -n "${dir}" && -f "${dir}/.env.roll" ]] || continue
Comment thread utils/images.sh Outdated
Comment on lines +445 to +450
while IFS=$'\t' read -r id repository size created; do
[[ -z "${id}" || "${repository}" == "<none>" ]] && continue
isRollImageRepository "${repository}" "${patterns[@]}" || continue
printf '%s\t%s\t%s\t%s\n' "${id}" "${repository}" "${size}" "${created}"
done < <(docker image ls --filter dangling=true --no-trunc \
--format '{{.ID}}\t{{.Repository}}\t{{.Size}}\t{{.CreatedSince}}' 2>/dev/null)
Comment thread README.md Outdated
| `utils/core.sh` | 184 lines | Messaging helpers, array/version utilities, network peering | **Coherent** — the three box-drawing functions are one-line wrappers around a shared `box` helper |
| `utils/config.sh` | 946 lines | Config schema, loading, validation, post-processing, `.env.roll` writes | **Coherent**; sole owner of configuration defaults |
| `utils/images.sh` | 375 lines | Service catalog (version key, toggle and image per service) and image-tag discovery from the registry | **Coherent** |
| `utils/images.sh` | 559 lines | Service catalog (version key, toggle and image per service), image-tag discovery from the registry, and cleanup of the local images roll runs | **Coherent** |
- Image patterns read from compose files keep a `*` only at the end of a
  name, so a user override such as `image: ${IMAGE}` can no longer turn
  into a pattern that claims every image on the host.
- Superseded images are also recognised by image ID. Docker's containerd
  image store keeps neither a name nor a digest on a superseded image, so
  roll now records the IDs of its images in ~/.roll/tmp/roll-image-ids
  before every pull and up and in roll image-cleanup, and treats a dangling
  image on record as its own. Verified on both image stores.
- roll shutdown recognises an environment whose project directory or
  .env.roll has gone through its dev.roll.environment.name network label,
  reports it and exits non-zero instead of silently leaving it running.
- Updated the utils/images.sh line count in the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sbudejis-epartment

Copy link
Copy Markdown

👍

@marcepartment
marcepartment merged commit e81805d into main Oct 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants