This project provides a collection of reusable, Debian-based development containers tailored for use with Distrobox and Podman.
By utilizing a tiered image hierarchy (a base image with shell utilities and agentic AI tooling extending to language-specific toolchain layers), this project provides a fast, isolated, and highly integrated development environment that shares home directory and configuration files seamlessly with the host system.
By transitioning from Alpine to Debian Slim (debian:bookworm-slim), this setup provides a lightweight footprint (~30MB base compressed) combined with native glibc library compatibility. This solves all relocation/dynamic loading library failures for pre-compiled developer utilities and agent runtimes.
baseLayer:- Core integration:
bash,sudo,passwd,findutils,util-linux,procps,unzip - Networking & files:
curl,wget,tar,ca-certificates - Editors & Search:
neovim,luajit(scripting),lua-check(linter),git,ripgrep(rg),less,bc,ncurses-bin - AI Agent CLIs:
agy(Google Antigravity CLI) andopencode(OpenCode CLI)
- Core integration:
lua-devLayer:- Lua environment:
luajit+lua-check(from base), withlua-language-server(LSP) andstylua(formatter) precompiled system-wide.
- Lua environment:
c-devLayer:- C/C++ environment:
build-essential(gcc/g++, make),clang,clangd(Neovim LSP),cmake, andninja-build.
- C/C++ environment:
go-devLayer:- Go environment: Go toolchain (
go1.26.5), standard tools (goplsLSP,dlvdebugger), andbuild-essentialfor CGO support.
- Go environment: Go toolchain (
iot-devLayer:- IoT & Embedded environment: Clones and compiles Raspberry Pi
openocdandpicotoolfrom source. Sets up the Pico SDK (PICO_SDK_PATH=/opt/pico-sdk). Installs cross-compilers (gcc-arm-none-eabi,gcc-riscv64-unknown-elf), debugger (gdb-multiarch), runtime dependencies, serial terminal (picocom), andpython3for build systems/scripts.
- IoT & Embedded environment: Clones and compiles Raspberry Pi
.
├── base/
│ └── Containerfile # Debian base with Distrobox integration, ripgrep, agy, and opencode
├── c-dev/
│ └── Containerfile # C development tools (clang, clangd, cmake, ninja-build)
├── go-dev/
│ └── Containerfile # Go development tools (Go 1.26.5, build-essential, gopls, dlv)
├── iot-dev/
│ └── Containerfile # IoT development tools (OpenOCD, picotool, Pico SDK, arm/riscv GCC, GDB)
├── lua-dev/
│ └── Containerfile # Lua development tools (lua-language-server, stylua)
├── build.sh # Sequential build automation script
└── README.md # This file
Ensure Podman and Distrobox are installed on your host system:
- Arch Linux:
sudo pacman -S podman distrobox - Fedora/RedHat:
sudo dnf install podman distrobox - Ubuntu/Debian:
sudo apt install podman distrobox
Run the build script to compile the base image first, followed by the C development image:
./build.shThis will produce the following images:
localhost/debian-distrobox-base:latestlocalhost/debian-distrobox-c:latestlocalhost/debian-distrobox-go:latestlocalhost/debian-distrobox-iot:latestlocalhost/debian-distrobox-lua:latest
Create a new distrobox instance using the C or Go development image:
# For C/C++ development
distrobox create --image localhost/debian-distrobox-c:latest --name c-box
# For Go development
distrobox create --image localhost/debian-distrobox-go:latest --name go-box
# For Lua development
distrobox create --image localhost/debian-distrobox-lua:latest --name lua-box
# For IoT development (privileged permissions recommended for USB devices & debug probes)
distrobox create --image localhost/debian-distrobox-iot:latest --name iot-box --additional-flags "--privileged -v /dev:/dev"Enter the created container environment:
distrobox enter c-box
# or
distrobox enter go-boxInside the container, you have full access to your host's home directory, SSH agents, and configurations, along with:
clang,cmake, andninja-build(for C development) orgo,gopls, anddlv(for Go development)gitandripgrepfor source managementnvim(Neovim) with native LSP supportagyandopencodefor terminal-based AI agent coding assistance
Once inside, verify that the environment is set up correctly:
For C/C++:
# Verify compilers and search
clang --version
cmake --version
ninja --version
rg --version
# Verify AI Agents
agy --version
opencode --helpFor Go:
# Verify Go and tools
go version
gopls version
dlv version
rg --version
# Verify AI Agents
agy --version
opencode --helpFor IoT:
# Verify compilers and debuggers
arm-none-eabi-gcc --version
riscv64-unknown-elf-gcc --version
gdb-multiarch --version
openocd --version
picotool version
picocom --version
# Verify SDK path
echo $PICO_SDK_PATHFor Lua:
# Verify interpreter and linter
luajit -v
luacheck --version
# Verify LSP and formatter
lua-language-server --version
stylua --versionTo add a new language layer (e.g., Python, Go, Rust), create a new directory (e.g., python/) with a Containerfile inheriting from the base:
FROM debian-distrobox-base:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip python3-venv \
&& rm -rf /var/lib/apt/lists/*
CMD ["/bin/bash"]Then, add its build command to build.sh.