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 \
119
119
microdnf clean all
120
120
rm -rf /var/cache/yum
121
121
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).
124
124
chown -R ${STACKABLE_USER_UID}:0 /stackable
125
125
chmod -R g=u /stackable
126
126
EOF
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ ARG KUBECTL_VERSION
8
8
ARG RELEASE
9
9
ARG JQ_VERSION
10
10
ARG TARGETARCH
11
+ ARG STACKABLE_USER_UID
11
12
12
13
LABEL name="Stackable Tools" \
13
14
maintainer="info@stackable.tech" \
@@ -30,16 +31,23 @@ RUN microdnf update && \
30
31
31
32
COPY tools/licenses /licenses
32
33
33
- USER stackable
34
34
WORKDIR /stackable/bin
35
35
ENV PATH=/stackable/bin:$PATH
36
36
37
37
# 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