·create-multistage-dockerfile
</>

create-multistage-dockerfile

建立多階段 Dockerfile,將建置和執行時間環境分開,以實現最少的生產映像。涵蓋建構器/運行時階段分離、工件複製、暫存/distroless/alpine 目標以及大小比較。當生產映像太大、當建置工具包含在最終映像中、當您需要從一個 Dockerfile 分離​​開發和生產映像時,或部署到邊緣或無伺服器等受限環境時,請使用。

10安裝·1熱度·@pjt222

安裝

$npx skills add https://github.com/pjt222/development-guides --skill create-multistage-dockerfile

如何安裝 create-multistage-dockerfile

透過命令列快速安裝 create-multistage-dockerfile AI 技能到你的開發環境

  1. 開啟終端機: 開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 執行安裝指令: 複製並執行以下指令:npx skills add https://github.com/pjt222/development-guides --skill create-multistage-dockerfile
  3. 驗證安裝: 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

來源:pjt222/development-guides。

SKILL.md

查看原文

Build multi-stage Dockerfiles that produce minimal production images by separating build tooling from runtime.

| Compilers | gcc, g++, rustc | Not needed | | Package managers | npm, pip, cargo | Sometimes (interpreted langs) | | Dev headers | -dev packages | Not needed | | Source code | Full source tree | Only compiled output | | Test frameworks | jest, pytest | Not needed |

The core pattern: build in a fat image, copy artifacts to a slim image.

建立多階段 Dockerfile,將建置和執行時間環境分開,以實現最少的生產映像。涵蓋建構器/運行時階段分離、工件複製、暫存/distroless/alpine 目標以及大小比較。當生產映像太大、當建置工具包含在最終映像中、當您需要從一個 Dockerfile 分離​​開發和生產映像時,或部署到邊緣或無伺服器等受限環境時,請使用。 來源:pjt222/development-guides。

可引用資訊

為搜尋與 AI 引用準備的穩定欄位與指令。

安裝指令
npx skills add https://github.com/pjt222/development-guides --skill create-multistage-dockerfile
分類
</>開發工具
認證
收錄時間
2026-03-10
更新時間
2026-03-10

Browse more skills from pjt222/development-guides

快速解答

什麼是 create-multistage-dockerfile?

建立多階段 Dockerfile,將建置和執行時間環境分開,以實現最少的生產映像。涵蓋建構器/運行時階段分離、工件複製、暫存/distroless/alpine 目標以及大小比較。當生產映像太大、當建置工具包含在最終映像中、當您需要從一個 Dockerfile 分離​​開發和生產映像時,或部署到邊緣或無伺服器等受限環境時,請使用。 來源:pjt222/development-guides。

如何安裝 create-multistage-dockerfile?

開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/pjt222/development-guides --skill create-multistage-dockerfile 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

這個 Skill 的原始碼在哪?

https://github.com/pjt222/development-guides