開發工作站
本指南使用保守的工具集和明確的冒煙測試建立了 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 金鑰路徑測試登入;該食譜故意不包含密碼。