一键导入
packaging
Package Go CLIs as minimal secure containers with distroless base images. Static binaries, non-root users, read-only filesystems for production.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Package Go CLIs as minimal secure containers with distroless base images. Static binaries, non-root users, read-only filesystems for production.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Production-grade Go CLI patterns, automated release workflows with Release Please, versioned docs, and coverage enforcement for DevSecOps build pipelines.
Design CLI commands that work independently and compose well for automation. Orchestrator pattern coordinates, subcommands execute discrete tasks.
Implement idiomatic Kubernetes operations with label selectors, strategic merge patches, and proper error handling for production-grade CLI tooling.
Choose the right Go CLI framework for Kubernetes-native tools. Decision matrix compares Cobra, urfave/cli, and Kong for ecosystem alignment and features.
Build Kubernetes-native CLIs in Go with type safety, testability, and complex orchestration logic for deployment tools and cluster automation.
Integrate Go CLIs with Kubernetes using client-go. Automatic config detection works on laptops, CI runners, and cluster pods with minimal RBAC setup.
| name | packaging |
| description | Package Go CLIs as minimal secure containers with distroless base images. Static binaries, non-root users, read-only filesystems for production. |
Packaging a Go CLI involves creating distributable artifacts that run anywhere. This section covers:
See the full implementation guide in the source documentation.
| Practice | Description |
|---|---|
| Static binaries | Use CGO_ENABLED=0 for portable builds |
| Non-root user | Always run as non-root in containers |
| Read-only filesystem | Set readOnlyRootFilesystem: true |
| Drop capabilities | Remove all capabilities with drop: ALL |
| Version in binary | Inject version at build time |
| Multi-arch support | Build for both amd64 and arm64 |
Ship binaries that run anywhere Kubernetes runs.