A puristic exercise to build a useable Linux container image consisting of nsh as shell (instead of GNU Bash), Rust coreutils (instead of GNU coreutils), ripgrep (instead of GNU grep), and frawk (instead of GNU awk).
For convenience a text editor is part of the image, currently this is kiro-editor (but more are possible, please suggest others).
It uses eyra instead of glibc and only uses static binaries. The container does not ship a libc and you are expected to copy static binaries into it if you want to extend it.
From the prebuilt image:
docker run --rm -it ghcr.io/pothos/rust-userland:main
From a locally built image:
make
docker run --rm -it rust-userland
- Add more common tools, specially those that are not in coreutils but are expected to usually exist, e.g.,
ps
,sed
,gzip
,diff
,less
,ip
(and others from iproute2),mount
(and others from util-linux),sudo
,curl
,wget
, … - Add more new tools written in Rust that provide similar/valuable functionality but aren't a drop-in (some already included) - Edit: Dropped for now and needs to be added back: As incompatible alternative to
ps
there is procs, fortop
there is bottom (btm
), forsed
there is sd, forfind
there is fd. It also ships bat as improvement overcat
and choose as improvement overcut
. - Add
getent
as user and DNS resolver (passwd
,group
,initgroups
,services
,ahosts
,ahostsv4
,ahostsv6
) for c-ward
PRs welcome ;)
Note: nsh
development is stalled and one could also try to get fish
working instead
Note: frawk
has a different regex format than awk