Skip to content

Commit 2df06ed

Browse files
committed
Fix hardcoded 'stackable' user
1 parent b2cec4c commit 2df06ed

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

druid/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ EOF
3535
USER ${STACKABLE_USER_UID}
3636
WORKDIR /stackable
3737

38-
COPY --chown=stackable:0 druid/stackable/patches/apply_patches.sh /stackable/apache-druid-${PRODUCT}-src/patches/apply_patches.sh
39-
COPY --chown=stackable:0 druid/stackable/patches/${PRODUCT} /stackable/apache-druid-${PRODUCT}-src/patches/${PRODUCT}
38+
COPY --chown=${STACKABLE_USER_UID}:0 druid/stackable/patches/apply_patches.sh /stackable/apache-druid-${PRODUCT}-src/patches/apply_patches.sh
39+
COPY --chown=${STACKABLE_USER_UID}:0 druid/stackable/patches/${PRODUCT} /stackable/apache-druid-${PRODUCT}-src/patches/${PRODUCT}
4040

4141
# Cache mounts are owned by root by default
4242
# We need to explicitly give the uid to use which is hardcoded to "1000" in stackable-base

java-devel/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
FROM stackable/image/stackable-base
99

1010
ARG PRODUCT
11+
ARG STACKABLE_USER_UID
1112

1213
# See: https://adoptium.net/en-gb/installation/linux/#_centosrhelfedora_instructions
1314
RUN cat <<EOF > /etc/yum.repos.d/adoptium.repo
@@ -59,7 +60,7 @@ RUN microdnf update && \
5960

6061
ENV JAVA_HOME="/usr/lib/jvm/temurin-${PRODUCT}-jdk"
6162

62-
COPY --chown=stackable:0 java-devel/stackable/settings.xml /stackable/.m2/settings.xml
63+
COPY --chown=${STACKABLE_USER_UID}:0 java-devel/stackable/settings.xml /stackable/.m2/settings.xml
6364

6465
# Mitigation for CVE-2021-44228 (Log4Shell)
6566
# This variable is supported as of Log4j version 2.10 and

0 commit comments

Comments
 (0)