Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pothos/rust-userland
Rust userland container image
https://github.com/pothos/rust-userland
Last synced: 18 days ago
JSON representation
Rust userland container image
- Host: GitHub
- URL: https://github.com/pothos/rust-userland
- Owner: pothos
- License: mit
- Created: 2022-04-18T13:36:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-20T05:03:06.000Z (6 months ago)
- Last Synced: 2024-05-20T06:23:29.503Z (6 months ago)
- Language: Dockerfile
- Size: 26.4 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Rust userland container image
A puristic exercise to build a useable Linux container image consisting of
[nsh](https://github.com/nuta/nsh) as shell (instead of GNU Bash), Rust [coreutils](https://github.com/uutils/coreutils)
(instead of GNU coreutils), [ripgrep](https://github.com/BurntSushi/ripgrep) (instead of GNU grep), and [frawk](https://github.com/ezrosent/frawk) (instead of GNU awk).For convenience a text editor is part of the image, currently this is [kiro-editor](https://github.com/rhysd/kiro-editor) (but more are possible, please suggest others).
It uses [eyra](https://github.com/sunfishcode/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.
## Usage
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
```## TODO
- 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](https://github.com/dalance/procs), for `top` there is [bottom](https://github.com/ClementTsang/bottom) (`btm`), for `sed` there is [sd](https://github.com/chmln/sd), for `find` there is [fd](https://github.com/sharkdp/fd). It also ships [bat](https://github.com/sharkdp/bat) as improvement over `cat` and [choose](https://github.com/theryangeary/choose) as improvement over `cut`.
- Add `getent` as user and DNS resolver (`passwd`, `group`, `initgroups`, `services`, `ahosts`, `ahostsv4`, `ahostsv6`) for c-wardPRs 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`