File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 11#  syntax=docker/dockerfile:1
22
33#  Base image and static SDK have to be updated together.
4- FROM  swift:6.1 AS builder
4+ #  Use TARGETPLATFORM to force correct architecture
5+ ARG  TARGETPLATFORM
6+ FROM  --platform=${TARGETPLATFORM} swift:6.1 AS builder
57WORKDIR  /workspace
68
79#  Install Swift static SDK for better portability
@@ -13,7 +15,12 @@ RUN swift sdk install \
1315COPY  . /workspace
1416
1517#  Build with static SDK using native compilation
16- RUN  swift build -c release --swift-sdk swift-6.1-RELEASE_static-linux-0.0.1 && \
18+ ARG  TARGETPLATFORM
19+ RUN  echo "=== Build Info ==="  && \
20+     echo "TARGETPLATFORM: ${TARGETPLATFORM}"  && \
21+     echo "Architecture: $(uname -m)"  && \
22+     echo "=================="  && \
23+     swift build -c release --swift-sdk swift-6.1-RELEASE_static-linux-0.0.1 && \
1724    find /workspace/.build -name "subtree"  -type f -executable -exec cp {} /workspace/subtree \; 
1825
1926#  Final minimal runtime image
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments