File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ FROM stackable/image/java-base
55
66ARG  PRODUCT
77ARG  RELEASE
8+ ARG  STACKABLE_USER_UID
89
910LABEL  name="Trino CLI"  \
1011@@ -22,14 +23,20 @@ RUN microdnf update && \
2223    microdnf clean all && \
2324    rm -rf /var/cache/yum
2425
25- USER  stackable
26- WORKDIR  /stackable
2726
28- COPY  --chown=stackable:stackable  trino-cli/licenses /licenses
27+ COPY  --chown=${STACKABLE_USER_UID}:0  trino-cli/licenses /licenses
2928
3029WORKDIR  /stackable/trino-cli
3130
32- RUN  curl -O https://repo.stackable.tech/repository/packages/trino-cli/trino-cli-${PRODUCT}-executable.jar \
33-     && ln -s trino-cli-${PRODUCT}-executable.jar trino-cli-executable.jar
31+ RUN  <<EOF
32+ curl -O https://repo.stackable.tech/repository/packages/trino-cli/trino-cli-${PRODUCT}-executable.jar
33+ ln -s trino-cli-${PRODUCT}-executable.jar trino-cli-executable.jar
3434
35+ #  All files and folders owned by root group to support running as arbitrary users.
36+ #  This is best practice as all container users will belong to the root group (0).
37+ chown -R ${STACKABLE_USER_UID}:0 /stackable
38+ chmod -R g=u /stackable
39+ EOF
40+ 
41+ USER  ${STACKABLE_USER_UID}
3542ENTRYPOINT  ["java" , "-jar" , "/stackable/trino-cli/trino-cli-executable.jar" ]
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments