File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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 作为默认标签)
3333docker 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)
4040if  [[ ${NODE_VERSION}  !=  " latest" &&  ${NODE_VERSION}  !=  " NA" ;  then 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments