| display_name | Rocky Linux Dev Environment | ||||||
|---|---|---|---|---|---|---|---|
| description | Provision Rocky Linux containers with Neovim, Go, Rust, Node.js as Coder workspaces | ||||||
| icon | ../../../site/static/icon/docker.png | ||||||
| maintainer_github | coder | ||||||
| verified | true | ||||||
| tags |
|
Provision Rocky Linux containers as Coder workspaces with this template.
The VM you run Coder on must have a running Docker socket and the coder user must be added to the Docker group:
# Add coder user to Docker group
sudo adduser coder docker
# Restart Coder server
sudo systemctl restart coder
# Test Docker
sudo -u coder docker psThis template provisions the following resources:
- Docker image (built by Docker socket and kept locally)
- Docker container pod (ephemeral)
- Docker volume (persistent on
/home/coder)
This means, when the workspace restarts, any tools or files outside of the home directory are not persisted. To pre-bake tools into the workspace, modify the container image. Alternatively, individual developers can personalize their workspaces with dotfiles.
Note This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.
This workspace includes:
- Neovim v0.12.1 - Modern Vim editor with Lazy.nvim plugin manager
- Go 1.26.2 - Go programming language
- Rust - With USTC crates.io and rustup mirrors configured
- Node.js (fnm) - Fast Node Manager for Node.js version management
- Bun - Fast all-in-one JavaScript runtime & toolkit (latest)
- GitHub CLI (
gh) - GitHub's official command-line tool - Tailwind CSS CLI - Tailwind CSS v4 command-line compiler, installed globally
- Claude Code - Anthropic's official CLI tool for Claude, globally installed
- omp (Oh My Pi) - AI coding agent for the terminal (globally installed via Bun with npmmirror)
- Fish shell - Default shell with fish configuration
- Common utilities - ripgrep, fd-find, tmux, screen, htop, btop, fastfetch, make
Edit the Dockerfile and run coder templates push to update workspaces.
This template supports HTTP/HTTPS proxy configuration during Docker image build. Set the following Terraform variables when needed:
http_proxyhttps_proxyno_proxy
在当前 coder-nvim 仓库根目录下执行构建:
docker build --pull --no-cache -t coder-rocky-dev:latest .当你 clone 了某个项目(假设路径为 ~/projects/my-app),切换到该项目目录并运行:
cd ~/projects/my-app
docker run -it --rm \
-v $(pwd):/home/coder/workspace \
-w /home/coder/workspace \
-u coder \
coder-rocky-dev:latest fish参数说明:
-v $(pwd):/home/coder/workspace:将本地项目目录挂载到容器内。-u coder:以容器内的非 root 用户coder身份运行。- 进入后可直接使用
nvim .编辑代码,或直接执行bun/go/cargo/omp/claude等。
本项目遵循 Semantic Versioning(MAJOR.MINOR.PATCH;release 流程稳定前处于 0.x 预发布阶段)。版本号、CHANGELOG.md 与 GitHub Release 全部由 release-please 根据 Conventional Commits 自动管理。
-
按提交规范合并若干 PR 到
master。 -
release-please 自动开启并维护一个 Release PR:聚合变更、递增
.release-please-manifest.json版本号、追加CHANGELOG.md。 -
合并 Release PR → 自动打 tag
vX.Y.Z、发布 GitHub Release。 -
Releaseworkflow 触发,构建 多架构(linux/amd64+linux/arm64)镜像并推送到 GHCR:镜像 说明 GHCR 地址 rocky-dev本仓库根 Dockerfile(完整开发环境)ghcr.io/defectingcat/rocky-devxfy-nvimxfy-nvim/子目录(容器化 Neovim)ghcr.io/defectingcat/xfy-nvim每个版本的 tag:
vX.Y.Z(精确)、X.Y(滚动 minor)、latest。
拉取已发布镜像:
docker pull ghcr.io/defectingcat/rocky-dev:latest
docker pull ghcr.io/defectingcat/xfy-nvim:0.1
main.tf的 Coder 模板仍由 Coder 服务端本地构建镜像(coder-rocky-dev:latest);GHCR 上的镜像服务于本地docker run/docker compose开发,二者互补。
所有提交必须遵循 Conventional Commits(PR 上由 commitlint 强制检查):
| 前缀 | 版本影响 | 示例 |
|---|---|---|
feat: |
minor | feat(dev): add zig toolchain |
fix: |
patch | fix(docker): retry mirror on 404 |
feat!: / BREAKING CHANGE |
major(0.x 阶段升 minor) |
feat(nvim)!: switch to lazy.nvim |
docs: chore: ci: build: refactor: test: |
无(聚合到下次发版) | ci: bump action versions |
常用 scope:dev docker nvim xfy-nvim tf ci。
合并 PR 时请使用 squash merge,使每个 PR 恰好对应一条 conventional commit。
| Workflow | 触发 | 作用 |
|---|---|---|
ci.yml |
push 到 master、PR |
commitlint、terraform fmt/validate、两个镜像各做 amd64 冒烟构建(不推送) |
release.yml |
push 到 master |
release-please 发版 + 多架构构建推送 GHCR |
Dependabot 每周更新 GitHub Actions 与基础镜像;依赖更新提交使用 fix(deps)/chore(ci) 前缀,自动汇入正常发版流程。