Skip to content

Commit 502b864

Browse files
committed
- statsd_exporter
- superset
1 parent 8ad5fa4 commit 502b864

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

stackable-base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ chown ${STACKABLE_USER_UID}:0 /stackable/.bashrc
148148
chown ${STACKABLE_USER_UID}:0 /stackable/.profile
149149

150150
cp /root/.curlrc /stackable/.curlrc
151-
chown stackable:0 /stackable/.curlrc
151+
chown ${STACKABLE_USER_UID}:0 /stackable/.curlrc
152152

153153
# CVE-2023-37920: Remove "e-Tugra" root certificates
154154
# e-Tugra's root certificates were subject to an investigation prompted by reporting of security issues in their systems

statsd_exporter/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
FROM stackable/image/stackable-base
55
ARG PRODUCT
6+
ARG STACKABLE_USER_UID
67

78
WORKDIR /statsd_exporter
89

9-
RUN --mount=type=cache,id=go-statsd-exporter,uid=1000,target=/go_cache <<EOF
10+
RUN --mount=type=cache,id=go-statsd-exporter,uid=${STACKABLE_USER_UID},target=/go_cache <<EOF
1011
microdnf update
1112

1213
# Tar and gzip are used to unpack the statsd_exporter source

superset/Dockerfile

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ FROM stackable/image/vector
9191
ARG PRODUCT
9292
ARG PYTHON
9393
ARG RELEASE
94+
ARG STACKABLE_USER_UID
9495

9596
LABEL name="Apache Superset" \
9697
maintainer="info@stackable.tech" \
@@ -107,22 +108,30 @@ ENV FLASK_APP="superset.app:create_app()" \
107108
ENV PATH="${HOME}/app/bin:${PATH}" \
108109
PYTHONPATH="${HOME}/app/pythonpath"
109110

110-
RUN microdnf update \
111-
&& microdnf install \
112-
cyrus-sasl \
113-
openldap \
114-
openldap-clients \
115-
openssl-libs \
116-
openssl-pkcs11 \
117-
python${PYTHON} \
118-
&& microdnf clean all && \
119-
rm -rf /var/cache/yum
111+
RUN <<EOF
112+
microdnf update
113+
microdnf install \
114+
cyrus-sasl \
115+
openldap \
116+
openldap-clients \
117+
openssl-libs \
118+
openssl-pkcs11 \
119+
python${PYTHON}
120+
121+
microdnf clean all
122+
rm -rf /var/cache/yum
123+
124+
# All files and folders owned by root to support running as arbitrary users
125+
# This is best practice as all container users will belong to the root group (0)
126+
chown -R ${STACKABLE_USER_UID}:0 /stackable
127+
chmod -R g=u /stackable
128+
EOF
120129

121130
COPY superset/licenses /licenses
122131

123-
COPY --from=builder --chown=stackable:stackable /stackable/ ${HOME}/
132+
COPY --from=builder --chown=${STACKABLE_USER_UID}:0 /stackable/ ${HOME}/
124133

125-
USER stackable
134+
USER ${STACKABLE_USER_UID}
126135
WORKDIR ${HOME}
127136

128137
CMD ["/bin/sh", "-c", \

0 commit comments

Comments
 (0)