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:
@@ -234,14 +234,61 @@ Steps:
|
||||
manifest inspect` reported "no such manifest" for an image that existed,
|
||||
so the check uses `docker buildx imagetools inspect`, and any error but
|
||||
"not found" stops the publish
|
||||
- [ ] David: publish a test app to gitea.federated.computer
|
||||
(`docker login` with a `write:package` token)
|
||||
- Tested 2026-12-03 by David: `coreapp publish` of
|
||||
`gitea.federated.computer/david/pub-test:0.1.0` worked (package and
|
||||
tag `v0.1.0` in Gitea). The account `david` isn't visible anonymously
|
||||
(its profile, repository and API answer 404 without a login), so its
|
||||
packages probably can't be pulled without one either: see "Private
|
||||
repositories and packages" under step 3
|
||||
- [ ] Run the workflow on a repository with a runner
|
||||
- [ ] Pin the image by digest in what the Core installs? Private
|
||||
packages need a pull token on the Core
|
||||
3. [ ] Install from a URL on the Core: `coreapps install <repo-url>[@tag]`
|
||||
(git clone at the tag, read `coreapp.toml` and `icon.png` only, pull the
|
||||
image). Show the source and what the app needs before installing
|
||||
|
||||
3. Install from a repository (2026-12-03): `coreapps plan|install
|
||||
<https://host/owner/repo>[@tag]` and `coreapps update <name>`; on the
|
||||
workstation `coreapp install <url>` (shows the app, its source and needs,
|
||||
asks) and `coreapp update <name>`. The installer fetches only the tag's
|
||||
commit (depth 1, no blobs but `coreapp.toml` and `icon.png`, which must be
|
||||
regular files; a link is ignored), with git limited to https, no password
|
||||
prompts and no system or root git settings. The default tag is the newest
|
||||
numeric release (`v1.2.3`, compared as numbers); `version` must match the
|
||||
tag; the image is always pulled for a repository install (never a
|
||||
same-named image built on the Core). The marker records `source`, `tag`
|
||||
and `commit`; installing the same name from another repository is
|
||||
refused. Tested on dev.fedcom.net with a stand-in repository (file://,
|
||||
the https rule relaxed for the test) and nginx 1.27/1.28 as the image:
|
||||
plan, install, update, "already newest", the other-repository refusal,
|
||||
remove; and, on the workstation, tag selection, the version check, the
|
||||
link icon and URL checks. Found and fixed: docker lists
|
||||
`docker.io/library/nginx` as `nginx`, so old images weren't deleted;
|
||||
`remove` force-deleted images, which could untag one another app uses
|
||||
- End to end with a real repository and registry: done with David's
|
||||
private pub-test (below)
|
||||
- Private repositories and packages (2026-12-03; Coreapps are "private"
|
||||
apps, so their repositories usually are): `coreapps login <host>
|
||||
<user>` (token on stdin), `logout`, `logins`; on the workstation
|
||||
`coreapp login <host>` asks for user and token. Tokens by host in
|
||||
`/etc/coreapps/credentials` (dir 700, file 600, outside `/opt/coreapps`,
|
||||
which deploys replace). git gets the token as an `http.<url>.extraHeader`
|
||||
in its environment, for that host only (never in a URL or an error);
|
||||
docker gets it in a config made for each pull, so no docker login stays
|
||||
on the Core. `login` checks the token with the host's registry
|
||||
(`/v2/`, then its token endpoint) and saves nothing if it's rejected.
|
||||
Tested 2026-12-03: a wrong token for gitea.federated.computer is
|
||||
rejected, file modes, logout, bad input, and David's private
|
||||
repository and image without a token both stop with "coreapp login"
|
||||
hints. Found: David's packages can't be pulled without a login
|
||||
(`unauthorized: reqPackageAccess`)
|
||||
- Tested 2026-12-03 by David: `coreapp login gitea.federated.computer`
|
||||
with a read-only token, then `coreapp install
|
||||
https://gitea.federated.computer/david/pub-test` from the private
|
||||
repository and package: installed at `https://pub-test.dev.fedcom.net/`
|
||||
(HTTP 200), `list` shows the source `@v0.1.0`, no docker login left
|
||||
on the Core
|
||||
- [ ] Tokens per host+owner, if a Core needs several accounts on one host
|
||||
- [ ] Superpanel would manage these tokens
|
||||
- [ ] Downgrades: installing an older tag is allowed (`@v1.0.0`); an app's
|
||||
data may not survive that. Refuse, or warn?
|
||||
- [ ] Pin the image digest at install (from the registry at that moment)
|
||||
so a re-pushed tag can't change what's installed
|
||||
4. [ ] Email and AI needs (findings below), then other services: PowerDNS
|
||||
records beyond the wildcard, if an app needs other hostnames
|
||||
5. The skill (moved ahead of 2-4, 2026-12-03): `skills/coreapp/SKILL.md`,
|
||||
|
||||
Reference in New Issue
Block a user