Install apps from their repository, including private ones

coreapps plan|install <https://host/owner/repo>[@tag] reads only
coreapp.toml and icon.png at the tag's commit (depth 1, blobs on demand,
regular files only), with git limited to https and no prompts or system
settings. The default tag is the newest numeric release; version must
match the tag; the image is always pulled. The marker records source,
tag and commit; the same name from another repository is refused.
coreapps update <name> moves to the newest release. On the workstation:
coreapp install <url> (shows the app and its needs, asks) and update.

Private apps: coreapps login <host> <user> keeps a read-only token (from
stdin) in /etc/coreapps/credentials (root only), checked with the host's
registry first. git gets it as an extraHeader for that host only, docker
in a config made for each pull. coreapp login/logout/logins on the
workstation. Tested with a private repository and package on Federated's
Gitea.

Fixed: old images of docker.io/library/... weren't deleted (docker lists
them by short name); remove force-deleted images another app could use;
coreapp help cut off multi-line descriptions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 14:51:41 -07:00
co-authored by Claude Opus 5.5
parent ed2841f092
commit bef3b86970
6 changed files with 608 additions and 37 deletions
+15
View File
@@ -83,6 +83,9 @@ each new app explains the files and the settings it gets.
| `coreapp check` | It answers at `https://<name>.<domain><health>` with a valid certificate |
| `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 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>` |
| `coreapp remove` | Uninstall it from the Core, with its database and sign-in client (asks first) |
@@ -94,6 +97,18 @@ To publish, set `image` to your registry (for Gitea,
(`.gitea/workflows/publish.yml`) that does the same when a `v*` tag is
pushed, for repositories with a runner that can use Docker.
A published app installs on any Core from its repository: `coreapp install
https://gitea.example.com/owner/app` runs the installer there with the URL.
It reads only `coreapp.toml` and `icon.png` at the newest release tag
(`v1.2.3`; or name one with `@v1.2.3`), checks that the tag matches
`version`, and pulls the image from its registry. The repository and the
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.
Installing and removing go through the Core's own `installapp` and
`uninstallapp`, so the app shows up in Superpanel. The installer gives apps
no `MONITOR` line, so they aren't added to Federated's external monitoring.