From c0b41669d84c02949ab2013eb0eb33f86223474e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E9=BB=84=E6=9E=97?= Date: Mon, 20 Oct 2025 15:26:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20build.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/build.sh b/build.sh index e0cf4c7..b784257 100644 --- a/build.sh +++ b/build.sh @@ -1,13 +1,6 @@ #!/bin/bash - -# 创建并启用支持多平台的 buildx 构建器 -docker buildx create --name multiarch-builder --driver docker-container --use -docker buildx inspect --bootstrap - -# 现在可以一次性构建并推送多平台镜像 -docker buildx build --platform linux/amd64,linux/arm64 \ - -f Dockerfile \ - -t yhl452493373/html2pdf-server:latest \ - --push . - -echo "多平台镜像构建并推送完成" \ No newline at end of file +echo 构建amd64镜像 +docker buildx build --platform linux/amd64 -f Dockerfile -t yhl452493373/html2pdf-server:linux-amd64 . +echo 构建arm64镜像 +docker buildx build --platform linux/arm64 -f Dockerfile -t yhl452493373/html2pdf-server:linux-arm64 . +echo 构建结束 \ No newline at end of file