Skip to content

Commit 6155a94

Browse files
committed
- superset
- tools
1 parent 83310eb commit 6155a94

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

superset/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ microdnf install \
119119
microdnf clean all
120120
rm -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).
124124
chown -R ${STACKABLE_USER_UID}:0 /stackable
125125
chmod -R g=u /stackable
126126
EOF

tools/Dockerfile

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ARG KUBECTL_VERSION
88
ARG RELEASE
99
ARG JQ_VERSION
1010
ARG TARGETARCH
11+
ARG STACKABLE_USER_UID
1112

1213
LABEL name="Stackable Tools" \
1314
maintainer="info@stackable.tech" \
@@ -30,16 +31,23 @@ RUN microdnf update && \
3031

3132
COPY tools/licenses /licenses
3233

33-
USER stackable
3434
WORKDIR /stackable/bin
3535
ENV 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}

0 commit comments

Comments
 (0)