| Age | Commit message (Collapse) | Author |
|
|
|
Each container build generated fresh host keys (ssh-keygen -A at
activation), so clients saw a REMOTE HOST IDENTIFICATION HAS CHANGED
warning after every rebuild. Install the pre-generated ECDSA host
key from etc/ssh-container-key into /etc/ssh at activation and set
(generate-host-keys? #f) so every container presents the same host
key. All keys now live in etc/ -- move the hello-container client
key there as well and reference ../etc/ from the OS definitions.
Verified: a rebuilt container serves SHA256:udYFFCT57uEdY1wDQgs8mvrB
Vl2BLrq227eMSons2Mo and ssh login works with hello printing 'Hello,
world!'.
|
|
hello-container.scm is now bare bones: hello + %base-packages, root
user and the openssh service (key-only root login, password fallback
"hello"), the /var/empty activation sshd needs, and the no-op
sysctl/udev shepherd services that keep a container boot from
hanging. The fingerprint activation and the DBG2 monitor loop moved
to the new debug-container.scm (host-name "debug-container").
The explicit root account needs (uid 0): without it
operating-system-accounts cannot recognize it and prepends its own
default root, producing 'accounts appear more than once: root'.
Both definitions pass 'guix system container --network --dry-run'
(--network is required for ssh-daemon's 'networking' dependency).
The minimal container boots and serves ssh on port 2222: hello runs
over ssh with EXIT=0 and herd reports ssh-daemon started.
|
|
The launcher setsid()s, so the container's shepherd (PID 1) and all
its services live in the launcher's process group. Killing only the
tracked launcher pid left the shepherd running -- holding e.g. the
sshd port and making the next START fail to bind. KILL now SIGKILLs
the process group (-pid); daemon shutdown likewise SIGTERMs groups
and SIGKILLs survivors.
|
|
|