File tree Expand file tree Collapse file tree 2 files changed +19
-11
lines changed Expand file tree Collapse file tree 2 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,8 @@ microdnf install \
119119microdnf clean all
120120rm -rf /var/cache/yum
121121
122- #  All files and folders owned by root to support running as arbitrary users
123- #  This is best practice as all container users will belong to the root group (0)
122+ #  All files and folders owned by root group  to support running as arbitrary users. 
123+ #  This is best practice as all container users will belong to the root group (0). 
124124chown -R ${STACKABLE_USER_UID}:0 /stackable
125125chmod -R g=u /stackable
126126EOF
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ ARG KUBECTL_VERSION
88ARG  RELEASE
99ARG  JQ_VERSION
1010ARG  TARGETARCH
11+ ARG  STACKABLE_USER_UID
1112
1213LABEL  name="Stackable Tools"  \
1314@@ -30,16 +31,23 @@ RUN microdnf update && \
3031
3132COPY  tools/licenses /licenses
3233
33- USER  stackable
3434WORKDIR  /stackable/bin
3535ENV  PATH=/stackable/bin:$PATH
3636
3737#  Get latest stable version from curl -L -s https://dl.k8s.io/release/stable.txt
38- RUN  curl https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl \
39-     -o /stackable/bin/kubectl && chmod +x /stackable/bin/kubectl
40- 
41- RUN  curl https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 \
42-     -o /stackable/bin/jq && \
43-     chmod +x /stackable/bin/jq
44- 
45- USER  stackable
38+ RUN  <<EOF
39+ curl https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl \
40+     -o /stackable/bin/kubectl
41+ chmod +x /stackable/bin/kubectl
42+ 
43+ curl https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 \
44+     -o /stackable/bin/jq
45+ chmod +x /stackable/bin/jq
46+ 
47+ #  All files and folders owned by root group to support running as arbitrary users.
48+ #  This is best practice as all container users will belong to the root group (0).
49+ chown -R ${STACKABLE_USER_UID}:0 /stackable
50+ chmod -R g=u /stackable
51+ EOF
52+ 
53+ USER  ${STACKABLE_USER_UID}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments