תחנת עבודה לפיתוח
מדריך זה בונה תחנת עבודה של אובונטו 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 חברות בקבוצה היא בדרך כלל שוות ערך לשורש מכיוון שהיא יכולה לשלוט בדמון Docker; הסר אותו אם למשתמש לא אמורה להיות סמכות זו.
גרסאות ומקורות
אל תבקשו “האחרון” בתחנת עבודה מבוקרת. רשום את הגרסאות הזמינות בפועל מתמונת המצב שנבחרה ובדוק את הגרסאות הללו. מאגר ספק או מתקין bootstrap מוסיף שורש אמון נפרד ומחזור חיים של עדכון; השתמש בו רק לאחר סקירת המפתח, המטא נתונים של המאגר, המונחים והתנהגות ההחזרה שלו.
כלים כגון 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; המתכון אינו מכיל סיסמה בכוונה.