-
Lightweight Efficiency: Porting Alpine Linux RootFS to WSL2
In our pursuit of a minimalist, high-performance development environment, we recently moved our primary local operations to a custom Alpine Linux footprint. By importing a minimal Alpine RootFS into WSL2, we’ve achieved a sub-60MB idle memory footprint and near-instantaneous shell readiness.
This post outlines the technical workflow to import the image and the specific configurations required to harden the environment for security and performance.
Although there is an Alpine Linux distro in the Microsoft Store, it is out of date. Using this method ensures you always have the latest version.
-
WSL2 Backup to OneDrive Cloud
WSL2 provides great disk performance, but it requires storing the files separately in a virtual disk that is not accessible by OneDrive. WSL2 can be backed up with wsl –export Debian to a VHD or TGZ, but that is a complete disk backup of 20gb or more – not scalable for hourly backups.
With this approach, we use Windows Task Scheduler to trigger
robocopyto incrementally sync directories from WSL2 to Onedrive’s native FS, so incremental copies are fast ( 1 s per 10k files), and OneDrive sync time remains negligible. -
Smokeping On Raspberry Pi Zero
Smokeping is a self-contained network monitoring app , capable of monitoring using ICMP/Ping, HTTP, DNS – as well as other signals generated from CLI monitoring tools (e.g. curl, dig, mtr etc). It provides a web-based monitoring UI to chart the probe measurements so no further monitoring apps (like Prometheus) are needed.
Running smokeping on a $5 Raspberry Pi Zero is a fun experiment in lightweight computing . Using Apache Mod FastCGI makes the app usable on the meager hardware.
-
Testing Without Excuses
Every app has that last inch (or mile) of code that’s not covered by tests. Usually it’s an interactive cycle of compile-run-inspect on the command line like
You Test
curl -X POST https://reqbin.com/echo/post/json##👀 You Expect:
{"success":"true"}Despite having 3-4 testing frameworks for unit tests, e2e, regression etc– there’s always a gap where you find yourself re-playing commands in the terminal to test.
A common case is 🔥firefighting where ad-hoc tests are needed to validate an emergency config change or deployment.