Repository navigation
Fixed a bug and added some new features - #17
Merged
Merged
Conversation
… 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>
marcepartment
requested review from
HeRovaZy,
mlaurense and
sbudejis-epartment
and
a balanced review from Copilot
September 30, 2026 11:13
There was a problem hiding this comment.
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
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 shutdownfor 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 on lines
+414
to
+415
| | sed -e 's/[$][{][^}]*[}]/*/g' -e 's/@.*$//' -e 's/:.*$//' \ | ||
| | grep -v '^$' || true |
Comment on lines
+41
to
+42
| ## a compose project roll did not start | ||
| [[ -n "${dir}" && -f "${dir}/.env.roll" ]] || continue |
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) |
| | `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>
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.