Devshell
development shell in a docker image
Install / Use
/learn @fetep/DevshellREADME
devshell
devshell is a Docker image containing my preferred development environment (which happens to
be text-based).
On start, a dev tmux session is created. When the tmux session ends, so does the docker
container.
lib/devshell.zsh contains
a zsh function dev. This handles starting the container and attaching to the tmux session
inside of it. All terminal features seem to work well inside of docker run -it, including
256 color support and bracketed paste mode.
devshell supports multiple instances per user/host (separate containers, so separate tmux
sessions). The default instance name is 1. To list running containers, run dev -l. To attach
to a specific instance, run dev $instance. To kill an instance, run dev -k.
The environment variable DEVSHELL is set to the current instance name.
Build
Starting with a barebones Fedora docker image, bin/build.sh installs everything I use for day to day dev work.
Versions are pinned in lib/versions. Some code needs to be written to look for updates here (dependabot style).
Filesystem pass through
We pass through $HOME (and optionally other directories, set $DEVSHELL_EXTRA_MOUNTS),
so this makes the dev environment ephemeral. Repave early, repave often.
/var/run/docker.sock is also passed through - this enables you to still interact with the
local dockerd as part of dev activities.
Since we pass through filesystems, it's important to have matching UIDs/GIDs. This has to happen at run-time (one docker image build may get run on multiple hosts), so as part of starting the image we pass through our own UID and docker's GID and set them appropriately in the container.
Since we aren't fully managing our $HOME, dotfiles are out of scope. To help manage dotfiles,
see my dotfiles repo.
Known Issues
- ssh-agent pass through (considering moving
$SSH_AUTH_SOCKto be somewhere in$HOME)
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
