Skip to content

Commit 37425c5

Browse files
committed
fix build command
1 parent 18027d1 commit 37425c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build-image.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ docker run --privileged --rm tonistiigi/binfmt --install all
3131
# 4. 多架构构建并推送至 Docker Hub(核心修改:用 buildx build --platform 指定多架构,--push 直接推送)
3232
# 推送 latest 标签(无论 Node 版本是否为 latest,都推送 latest 作为默认标签)
3333
docker buildx build \
34-
--platform "${TARGET_ARCHITECTURES}" \ # 指定多架构
35-
--build-arg NODE_VERSION="${NODE_VERSION}" \ # 传递 Node 版本参数
36-
-t "${DOCKER_HUB_REPO}:latest" \ # Docker Hub latest 标签
37-
--push . # 直接推送(无需本地 tag,Buildx 会自动处理多架构镜像索引)
34+
--platform "${TARGET_ARCHITECTURES}" \
35+
--build-arg NODE_VERSION="${NODE_VERSION}" \
36+
-t "${DOCKER_HUB_REPO}:latest" \
37+
--push .
3838

3939
# 若 Node 版本不是 latest/NA,额外推送版本标签(如 webdev:20)
4040
if [[ ${NODE_VERSION} != "latest" && ${NODE_VERSION} != "NA" ]]; then

0 commit comments

Comments
 (0)