File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,19 @@ RUN cargo build --release -p scx_rustland
3232
3333FROM  gcr.io/distroless/cc
3434
35+ ARG  TARGETPLATFORM
36+ 
37+ RUN  if [ "$TARGETPLATFORM"  = "linux/arm64"  ]; then \
38+       echo "Setting $COPY_LIBS_DIR to aarch64-linux-gnu"  && \
39+       export COPY_LIBS_DIR="aarch64-linux-gnu" ; \
40+     else \
41+       echo "Setting default COPY_LIBS_DIR x86_64-linux-gnu"  && \
42+       export COPY_LIBS_DIR="x86_64-linux-gnu" ; \
43+     fi
44+ 
3545COPY  --from=builder /scx/target/release/scx_rustland /scx_rustland
36- COPY  --from=builder /usr/lib/aarch64-linux-gnu /libelf.so.1 /usr/lib/libelf.so.1
37- COPY  --from=builder /usr/lib/aarch64-linux-gnu /libz.so.1 /usr/lib/libz.so.1
38- COPY  --from=builder /usr/lib/aarch64-linux-gnu /libseccomp.so.2 /usr/lib/libseccomp.so.2
46+ COPY  --from=builder /usr/lib/$COPY_LIBS_DIR /libelf.so.1 /usr/lib/libelf.so.1
47+ COPY  --from=builder /usr/lib/$COPY_LIBS_DIR /libz.so.1 /usr/lib/libz.so.1
48+ COPY  --from=builder /usr/lib/$COPY_LIBS_DIR /libseccomp.so.2 /usr/lib/libseccomp.so.2
3949
4050CMD  ["/scx_rustland" ]
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments