About
OtterLinux is a minimalist Linux distribution designed for container environments. It is modeled on Alpine Linux, but with its own package manager, OtterPkg, written in Rust.
The project started as an educational experiment and a platform for learning low-level systems programming.
Key Features
- Minimalism - based on musl and busybox instead of glibc and GNU coreutils
- Lightweight - base image under 10 MB
- OtterPkg - a custom package manager in Rust
- Containerization - optimized for Docker/Podman
Tech Stack
- musl - lightweight libc (instead of glibc)
- busybox - a set of Unix tools in a single binary
- OtterPkg - package manager written in Rust
- Podman/Docker - runtime environment
Building
Creating the rootfs
mkdir -p build/rootfs
cd build
# Build musl
curl -O https://musl.libc.org/releases/musl-1.2.4.tar.gz
tar xzf musl-1.2.4.tar.gz
cd musl-1.2.4
./configure --prefix=/usr --disable-shared
make -j$(nproc)
make install DESTDIR=../rootfs
# Build busybox
cd ..
curl -O https://busybox.net/downloads/busybox-1.36.0.tar.bz2
tar xjf busybox-1.36.0.tar.bz2
cd busybox-1.36.0
make defconfig
sed -i 's/.*CONFIG_STATIC.*/CONFIG_STATIC=y/' .config
make -j$(nproc)
make install CONFIG_PREFIX=../rootfs
Building the container image
tar -C build/rootfs -czf build/otterlinux-rootfs.tar.gz .
cat <<EOF > Containerfile
FROM scratch
ADD otterlinux-rootfs.tar.gz /
CMD ["/bin/sh"]
EOF
podman build -t otterlinux .
podman run --rm -it otterlinux
Project Status
The project is under active development. Planned features:
- Package repository
- Update system
- LXC support on Proxmox
- Documentation and guides
License
The project is released under the GPL-3.0 license.