This commit is contained in:
2026-03-13 23:38:02 +08:00
parent 608e2f20a6
commit 625505edd3
2 changed files with 9 additions and 6 deletions
+2 -1
View File
@@ -261,10 +261,11 @@ build_image() {
print_step "开始构建 Docker 镜像..."
print_info "镜像名称:${IMAGE_NAME}:${IMAGE_TAG}"
print_info "构建目录:${PROJECT_DIR}"
print_info "使用缓存策略:未修改的层将使用缓存"
BUILD_START=$(date +%s)
if docker build --no-cache -t "${IMAGE_NAME}:${IMAGE_TAG}" .; then
if docker build -t "${IMAGE_NAME}:${IMAGE_TAG}" .; then
BUILD_END=$(date +%s)
BUILD_TIME=$((BUILD_END - BUILD_START))