Skip to content

aotodev/archdev

Repository files navigation

archdev — Arch Linux C++/Vim development container

Minimal Arch Linux environment for C/C++ development with Vim and Clangd LSP support. Suited for local editing, CI builds, and reproducible environments.

Intended use and scope

  • Primary use: mount your local project into /workspace and develop inside the container.
  • Designed as a clean base image for C/C++ variants that add project-specific dependencies (e.g., scip, openssh, etc.).
  • Suitable for CI builds; not intended as a minimal production runtime.

Features

  • Toolchain: gcc, clang/llvm, cmake, ninja, make, ccache
  • Debuggers: gdb, lldb (+ custom pipe helpers)
  • Editor & shell: Vim (vim-plug), zsh (oh-my-zsh), tmux
  • CLI utilities: curl, fzf, ripgrep, fd, git, tree, python3, pv
  • Defaults:
    • User: non-root (configurable at build time)
    • Workdir: /workspace
    • Shell: /bin/zsh
    • Labels and metadata for traceability

Quick start

Build:

  • docker buildx build -t aotodev/archdev:latest .
  • With user mapping (override default USER/UID/GID build args to match your host; helps avoid permission issues on mounted volumes):
    • docker buildx build -t aotodev/archdev:latest --build-arg USER=$(id -un) --build-arg UID=$(id -u) --build-arg GID=$(id -g) .
  • Note: Defaults are USER=dev, UID=1000, GID=1000; override with --build-arg as shown above.

Run:

  • Mount your project into /workspace (default workdir):
    • docker run --rm -it -v "$PWD":/workspace -w /workspace aotodev/archdev:latest

Debugger helpers: pipe

This image ships small helpers to emulate shell-style pipelines inside gdb/lldb.

  • GDB:

    • Loaded via ~/.gdbinit
    • Usage: (gdb) pipe <gdb-command> | <shell-command>
    • Example: (gdb) pipe info locals | grep ptr
  • LLDB:

    • Loaded via ~/.lldbinit
    • Usage: (lldb) pipe <lldb-command> | <shell-command>
    • Example: (lldb) pipe disassemble -n main | grep mov

Scripts live in debugger_scripts/ and are copied to ~/.debugger_scripts in the image.

Dotfiles

The image copies the repo’s dotfiles into the user’s home:

  • .vimrc (with vim-plug and CurtineIncSw.vim)
  • .zshrc (oh-my-zsh bootstrap)
  • .tmux.conf
  • .gdbinit, .lldbinit (enable the pipe commands)

Vim plugins

Vim is set up with vim-plug and plugin definitions in .vimrc. On first run inside the container:

  • Start Vim, then run :PlugInstall
  • Headless alternative: vim +PlugInstall +qall

Extending this image

Use this image as a base and add project-specific dependencies with pacman or your build tools.

Example (add scip and openssh):

FROM aotodev/archdev:latest
# Inherits non-root user 'dev' with passwordless sudo
RUN sudo pacman -Syu --noconfirm \
 && sudo pacman -S --noconfirm scip openssh \
 && sudo pacman -Scc --noconfirm

Build your derivative:

  • docker build -t my/archdev-scip:latest .

Repository layout

  • Dockerfile — image definition and tooling
  • debugger_scripts/ — python helpers for gdb/lldb pipelines
  • Dotfiles: .vimrc, .zshrc, .tmux.conf, .gdbinit, .lldbinit

About

Minimal Arch Linux environment for C/C++ development with Vim and Clangd LSP support

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published