Small registry that holds custom images to be used in the Hero Compute system
- Dockerfile 100%
|
All checks were successful
Build VM Images / Build and Push All Images (push) Successful in 59s
- Remove password-based authentication from images - Configure SSHD to prohibit password login - Prepare `/root/.ssh` for authorized keys - Update image descriptions in registry config - Revise documentation for SSH access and image setup |
||
|---|---|---|
| .forgejo/workflows | ||
| images | ||
| images.toml | ||
| README.md | ||
Hero Compute Registry
VM image registry for Hero Compute. Defines available images and contains Dockerfiles for custom builds.
Structure
hero_compute_registry/
├── images.toml # Image definitions (loaded by hero_compute_server)
├── .forgejo/workflows/ # CI: auto-build and push on every commit
└── images/ # Custom Dockerfiles
├── alpine/
├── ubuntu-24.04/
├── ubuntu-22.04/
├── ubuntu-20.04/
└── debian/
SSH Access
All images use SSH key authentication only — no passwords. Password auth is disabled.
To access a VM:
- Add your SSH public key in the Hero Compute Settings page
- Deploy and start a VM
- Connect:
ssh root@<mycelium-ipv6>
Your SSH keys are injected into the VM's /root/.ssh/authorized_keys at deploy time.
Adding Images
From Public Registries
Add an entry to images.toml:
[[images]]
name = "Nginx"
reference = "nginx:alpine"
description = "Nginx web server on Alpine"
Custom Images (Forgejo)
- Create a Dockerfile in
images/:
# images/my-app/Dockerfile
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y nginx curl openssh-server \
&& mkdir -p /run/sshd /root/.ssh \
&& chmod 700 /root/.ssh \
&& touch /root/.ssh/authorized_keys \
&& chmod 600 /root/.ssh/authorized_keys \
&& sed -i 's/#PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config \
&& sed -i 's/#PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
- Build and push:
docker build -t forge.ourworld.tf/lhumina_code/hero_compute_registry/my-app:latest images/my-app/
docker login forge.ourworld.tf
docker push forge.ourworld.tf/lhumina_code/hero_compute_registry/my-app:latest
- Add to
images.toml:
[[images]]
name = "My App"
reference = "forge.ourworld.tf/lhumina_code/hero_compute_registry/my-app:latest"
description = "Custom image with nginx and curl"
- On each node, login to the registry (if private):
chvm login forge.ourworld.tf -u <username> -p <token>
CI/CD
The .forgejo/workflows/build-images.yml workflow automatically builds and pushes all images on every push to development or main that modifies images/ or images.toml.
Configuration
The hero_compute_server fetches images.toml from this repo at runtime. Override the URL with:
HERO_COMPUTE_REGISTRY_URL=https://forge.ourworld.tf/lhumina_code/hero_compute_registry/raw/branch/main/images.toml
Default Image
Mark one image with default = true. This image is pre-selected in the deploy UI:
[[images]]
name = "Ubuntu 24.04"
reference = "forge.ourworld.tf/lhumina_code/hero_compute_registry/ubuntu-24.04:latest"
default = true