选择配置并点击「生成Dockerfile」
• 使用 .dockerignore 排除 node_modules、.git 等文件• 合并 RUN 指令减少镜像层数• 使用 --no-cache 或 --no-install-recommends 减小体积• 固定基础镜像版本标签而非使用 latest• 多阶段构建可将镜像体积减少 5-10 倍