Pin a release's image by digest, and refuse downgrades without --downgrade

After pulling a release, coreapps records its registry digest and runs
image:version@sha256:..., so a re-pushed tag can't change an installed
app; installing that release again with another digest is refused. An
older release than the installed one needs --downgrade (coreapps
install/plan, coreapp install), since it may not understand the newer
one's data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 18:31:09 -07:00
co-authored by Claude Opus 5.5
parent dcc72fe5da
commit da36a669bf
7 changed files with 143 additions and 29 deletions
+8 -3
View File
@@ -91,7 +91,7 @@ each new app explains the files and the settings it gets.
| `coreapp signin [path]` | Sign in to it as a browser would, with the Core's test account (`coreapp.test@<domain>`, made on the VM's Core when first needed), starting at `path` (default `/login`), and show each step; `--cookies <file>` keeps the app's cookies, `--code` gets a code for apps that start sign-in in the browser, `--remove-account` removes the account |
| `coreapp status` / `logs [-f]` / `shell [command]` | Its container, its log, a shell in it (or one command, without a terminal) |
| `coreapp list` | The apps on the Core installed this way |
| `coreapp install <https://host/owner/repo>[@tag]` | Install a published app from its repository on the Core, as its owner would: shows what it is and needs, asks, then installs (default: the newest release tag) |
| `coreapp install [--downgrade] <https://host/owner/repo>[@tag]` | Install a published app from its repository on the Core, as its owner would: shows what it is and needs, asks, then installs (default: the newest release tag; an older release than the installed one only with `--downgrade`) |
| `coreapp update <name>` | Update an app installed from a repository to its newest release |
| `coreapp login <host>` / `logout <host>` / `logins` | Give the Core a token for private apps from a host (asks for the user and token), forget it, list them |
| `coreapp publish [--platform <list>]` | Build the release image, push it to the registry in `coreapp.toml` (`image:version`, never replacing a published version) and tag the commit `v<version>` |
@@ -114,8 +114,13 @@ image can be private: `coreapp login gitea.example.com` gives the Core a
token for that host (for Gitea, one with read access to repositories and
packages), which the installer uses for the repository and the image. It
keeps tokens in `/etc/coreapps/credentials` on the Core (root only); docker
gets the token only for each pull, so the Core keeps no docker login. This
is what Superpanel's Coreapps screen would do.
gets the token only for each pull, so the Core keeps no docker login.
The Core runs the image it pulled at install, by its digest
(`image:version@sha256:...`), so pushing the tag again can't change an
installed app; installing that release again then is refused. Installing an
older release than the installed one is refused too (it may not understand
the newer one's data) unless you add `--downgrade`. This is what
Superpanel's Coreapps screen would do.
Installing and removing go through the Core's own `installapp` and
`uninstallapp`, so the app shows up in Superpanel. The installer gives apps