A starting point for the Own CuOS Init App level — you implement your own update mechanism or way of deployment, instead of letting CuOS IaC do it.
The CuOS Init App is the one container CuOS starts on a finished system, and
from which everything else is started. CuOS names it in init_image.
| File | What it is |
|---|---|
Dockerfile |
Alpine base, with the dev.cuos.app_command label naming the mounts a CuOS Init App needs — the docker socket, the registry credentials, /system.json, the API socket and the custom CA certificates. |
entrypoint.sh |
Where your application starts. Reports readiness, then keeps running. |
cuos_lib.sh |
Shell wrappers around the CuOS API socket: cuos_ready, cuos_update. |
api/post_update |
Optional hook CuOS runs in this container after a successful update. Delete it if you have nothing to do there. |
- Fork or copy this repository.
- Put your application into
entrypoint.shand theDockerfile. - Publish the image, then point
init_imageat it:
{
"#include": ["cuos-release/release.json"],
"hostname": "my-system",
"init_image": "ghcr.io/my-org/my-init-app",
"init_image_version": "1.0.0",
"init_image_digest": "sha256:..."
}Naming init_image yourself replaces CuOS IaC, which release.json
otherwise pins there.
- Build the system with cuos-release.
Everything a remote system sends you must be protected by signatures. CuOS IaC uses git commit signing and docker digest checks; an Init App that updates the system has to bring its own equivalent. An update path that trusts whatever it downloads is a remote code execution path.
The commented block in the Dockerfile lists the hardening options worth
turning on — memory limit, read-only root, tmpfs mounts.
- Your CuOS Init App — the label, the startup parameters, the update hook, the rollback rules
- CuOS API — what the socket accepts
MIT-0 — see LICENSE.txt. MIT without the attribution clause: copy this, change it, ship it, and you owe nothing — no notice to carry, no credit to give.
That is deliberate. This repository exists to be taken. CuOS itself is Apache-2.0; only the boiler plates and the example are MIT-0.