Skip to Content
Guides开发工作站

开发工作站

本指南使用保守的工具集和明确的冒烟测试构建了 Ubuntu 24.04 GNOME 工作站。语言和编辑器版本遵循所选的包源,除非您固定并查看其他源。

提示

Create an Ubuntu 24.04 GNOME development workstation with a dark color scheme, SSH, Docker, Git, Python, Node.js, curl, jq, tmux, htop, and Neovim. Create a locked-password user named dev with sudo and Docker group intent. Do not add third-party repositories unless their HTTPS URL, signing key, release support, and license are explicit. Add tests for the desktop session, tool versions, Docker service, group membership, and one container smoke test.

查看食谱

{ "name": "ubuntu24-development-workstation", "base_image": "ubuntu-24.04", "os": { "features": ["desktop", "ssh", "docker", "git", "python", "nodejs"], "packages": ["curl", "jq", "tmux", "htop", "neovim"], "users": [ { "username": "dev", "groups": ["sudo", "docker"], "shell": "/bin/bash" } ], "desktop_settings": { "color_scheme": "prefer-dark", "fonts": { "monospace_font": "Ubuntu Mono 13" }, "power": { "idle_delay": 600, "sleep_inactive_ac_timeout": 0, "sleep_inactive_ac_type": "nothing" } } } }

确认每个功能都按预期在 Ubuntu 24.04 上扩展。 docker 组成员身份通常与 root 等效,因为它可以控制 Docker 守护进程;如果用户不应该拥有该权限,请将其删除。

版本和来源

不要在受控工作站中要求“最新”。记录所选快照中实际可用的版本并测试这些版本。供应商存储库或引导安装程序添加了单独的信任根和更新生命周期;仅在检查其密钥、存储库元数据、术语和回滚行为后才使用它。

Rustup、语言版本管理器、编辑器扩展和容器镜像等工具可以在镜像构建后下载移动代码。如果它们对工作站基线很重要,请将它们固定并将其出处包含在证据包中。

验证场景

{ "id": "development-smoke", "name": "Development workstation smoke test", "enabled": true, "tests": ["boot", "login", "packages", "services"], "custom_tests": [ { "description": "Confirm core tools and Docker are usable.", "assertions": [ { "type": "command_succeeds", "description": "Python reports a version.", "params": {"command": "python3 --version"} }, { "type": "command_succeeds", "description": "Node.js reports a version.", "params": {"command": "node --version"} }, { "type": "service_running", "description": "The Docker daemon is running.", "params": {"service": "docker"} }, { "type": "user_in_group", "description": "The dev account has the reviewed Docker authority.", "params": {"username": "dev", "group": "docker"} } ] } ] }

为您实际安装的每个图形编辑器添加 GUI 断言。包检查无法检测到首次启动损坏、许可证对话框、缺少显示集成或错误的默认桌面。

最后,使用批准的注册或 SSH 密钥路径测试登录;该食谱故意不包含密码。