- Shell 64.6%
- Dockerfile 35.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
The router scheduler repull-tick checks the git.exithub.net images every minute, so CI no longer needs SSH access to the router. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
| .forgejo/workflows | ||
| .gitignore | ||
| build.sh | ||
| CLAUDE.md | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| README.md | ||
| sshd_config | ||
alpine-mikrotik
An SSH root shell for the home MikroTik router (RB5009, linux/arm64), packaged as a
container image: Alpine with openssh, sqlite and vim, configured entirely from the
container's environment.
Quick start
Build locally (default is arm64, the image is loaded into the local docker):
bash build.sh # linux/arm64
bash build.sh linux/amd64 # native build, fastest
The build runs a self-test that starts the entrypoint with throwaway keys and checks the sshd config, so a green build means the image comes up.
Public keys are passed as one environment variable per key, SSH_AUTH_KEY_<id>. The id is
arbitrary, the value is a public key used as-is:
/container/envs/add list=alpine key=SSH_AUTH_KEY_laptop value="ssh-ed25519 AAAA... me@laptop"
Host keys are generated on first start into the mounted /etc/ssh/host_keys, so they
survive image updates. If no usable key is found the container exits with an explanation.
Build and deploy
Forgejo Actions builds the arm64 image on every push to main, pushes it to
git.exithub.net/ivan.pavlina/alpine-mikrotik (:latest and :<commit sha>), then the router's
repull-tick scheduler repulls the container within a minute. Tags v* publish a :<tag> image; pull requests only build.
More
See CLAUDE.md for architecture, the RouterOS container definition, CI details and known pitfalls.