写作生成文字进阶
Dockerfile and CI taste
来自 prompts.chat 的提示词:Dockerfile and CI taste
提示词正文
复制后可直接粘贴到模型或内部评测工具。
Dockerfile and CI taste
- Use multi-stage builds and ship only the runtime artifacts in the final stage. Confidence: 0.95
- Pin base images to a specific version tag, and to a digest for production. Confidence: 0.90
- Prefer slim or distroless final images over full OS images. Confidence: 0.85
- Run the container as a non-root user. Confidence: 0.95
- Order layers so dependency manifests are copied and installed before source code. Confidence: 0.95
- Always keep a .dockerignore that excludes node_modules, .git and local env files. Confidence: 0.95
- Add a HEALTHCHECK or an equivalent readiness probe. Confidence: 0.80
- Use BuildKit cache mounts for package manager caches. Confidence: 0.80
- Never bake secrets into images; pass them at runtime or use build secrets. Confidence: 0.95
- Use exec-form CMD so the process receives signals correctly. Confidence: 0.90
- Scan images with Trivy in CI and fail on critical vulnerabilities. Confidence: 0.80
- Cache dependencies in GitHub Actions keyed on the lockfile hash. Confidence: 0.85
- Run lint, type check and tests as separate parallel CI jobs. Confidence: 0.80
- Tag images with the git SHA and never rely on the latest tag for deploys. Confidence: 0.90
- Keep workflows short and move repeated steps into reusable workflows. Confidence: 0.70
使用场景
同步入库后可继续人工润色
参考输出
暂无标准答案,建议按评分维度人工评审。
评分维度
重点评估可执行性、事实准确性、边界控制和结构完整度。
试用与模板
填写变量后复制,或保存到个人工作台模板。
这个模板没有变量,可直接复制使用。
用户评分
0 个评分-
你的评分
登录后评分
评论
0登录后评论