diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e31d6107..2a96d522f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ All notable changes to this project will be documented in this file. - Enable [Docker build checks](https://docs.docker.com/build/checks/) ([#872]). - java: migrate to temurin jdk/jre ([#894]). - tools: bump kubectl to `1.31.1` and jq to `1.7.1` ([#896]). -- Make username, user id, group id configurable, use numeric ids everywhere, change group of all files to 0 ([#849], [#890]). +- Make username, user id, group id configurable, use numeric ids everywhere, change group of all files to 0 ([#849], [#890], [#897]). - ci: Bump `stackabletech/actions` to 0.0.7 ([#901], [#903]). ### Removed @@ -87,6 +87,7 @@ All notable changes to this project will be documented in this file. [#890]: https://github.com/stackabletech/docker-images/pull/890 [#894]: https://github.com/stackabletech/docker-images/pull/894 [#896]: https://github.com/stackabletech/docker-images/pull/896 +[#897]: https://github.com/stackabletech/docker-images/pull/897 [#898]: https://github.com/stackabletech/docker-images/pull/898 [#901]: https://github.com/stackabletech/docker-images/pull/901 [#903]: https://github.com/stackabletech/docker-images/pull/903 diff --git a/airflow/Dockerfile b/airflow/Dockerfile index 5cefe0079..033d4aa71 100644 --- a/airflow/Dockerfile +++ b/airflow/Dockerfile @@ -135,6 +135,13 @@ chown -R ${STACKABLE_USER_UID}:0 /stackable chmod -R g=u /stackable EOF +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} WORKDIR /stackable diff --git a/druid/Dockerfile b/druid/Dockerfile index a294ac552..6cc597774 100644 --- a/druid/Dockerfile +++ b/druid/Dockerfile @@ -126,6 +126,13 @@ chown -R ${STACKABLE_USER_UID}:0 /stackable chmod -R g=u /stackable EOF +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} ENV PATH="${PATH}":/stackable/druid/bin diff --git a/hadoop/Dockerfile b/hadoop/Dockerfile index 124a7abc4..28e65634c 100644 --- a/hadoop/Dockerfile +++ b/hadoop/Dockerfile @@ -177,6 +177,13 @@ EOF COPY hadoop/licenses /licenses +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} ENV HOME=/stackable diff --git a/hbase/Dockerfile b/hbase/Dockerfile index d72343144..7b9db6c3e 100644 --- a/hbase/Dockerfile +++ b/hbase/Dockerfile @@ -362,6 +362,13 @@ chown -R ${STACKABLE_USER_UID}:0 /stackable chmod -R g=u /stackable EOF +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} ENV HBASE_CONF_DIR=/stackable/hbase/conf ENV HOME=/stackable diff --git a/hello-world/Dockerfile b/hello-world/Dockerfile index 9680043b6..3a27047cf 100644 --- a/hello-world/Dockerfile +++ b/hello-world/Dockerfile @@ -28,6 +28,13 @@ chown -R ${STACKABLE_USER_UID}:0 /stackable chmod -R g=u /stackable EOF +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} WORKDIR /stackable diff --git a/hive/Dockerfile b/hive/Dockerfile index 794faef6b..d3f5f61ae 100644 --- a/hive/Dockerfile +++ b/hive/Dockerfile @@ -142,6 +142,13 @@ EOF COPY --chown=${STACKABLE_USER_UID}:0 --from=hive-builder /stackable/jmx /stackable/jmx COPY hive/licenses /licenses +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} ENV HADOOP_HOME=/stackable/hadoop diff --git a/kafka/Dockerfile b/kafka/Dockerfile index 4fac60a91..c8ae7f05e 100644 --- a/kafka/Dockerfile +++ b/kafka/Dockerfile @@ -102,6 +102,13 @@ chown -R ${STACKABLE_USER_UID}:0 /stackable chmod -R g=u /stackable EOF +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} ENV PATH="${PATH}:/stackable/bin:/stackable/kafka/bin" diff --git a/nifi/Dockerfile b/nifi/Dockerfile index 472be39a5..4fd145c65 100644 --- a/nifi/Dockerfile +++ b/nifi/Dockerfile @@ -129,6 +129,13 @@ chown -R ${STACKABLE_USER_UID}:0 /stackable chmod -R g=u /stackable EOF +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} ENV HOME=/stackable diff --git a/omid/Dockerfile b/omid/Dockerfile index 1c7d14f82..38cec3337 100644 --- a/omid/Dockerfile +++ b/omid/Dockerfile @@ -101,6 +101,13 @@ chown -R ${STACKABLE_USER_UID}:0 /stackable chmod -R g=u /stackable EOF +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} WORKDIR /stackable/omid-tso-server diff --git a/opa/Dockerfile b/opa/Dockerfile index 1979cd061..b25cc0e2d 100644 --- a/opa/Dockerfile +++ b/opa/Dockerfile @@ -133,6 +133,13 @@ chown -R ${STACKABLE_USER_UID}:0 /stackable chmod -R g=u /stackable EOF +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} WORKDIR /stackable/opa diff --git a/spark-k8s/Dockerfile b/spark-k8s/Dockerfile index 965efdaf3..e68a18721 100644 --- a/spark-k8s/Dockerfile +++ b/spark-k8s/Dockerfile @@ -328,6 +328,13 @@ chown -R ${STACKABLE_USER_UID}:0 /stackable chmod -R g=u /stackable EOF +# ---------------------------------------- +# Attention: We are changing the group of all files in /stackable directly above +# If you do any file based actions (copying / creating etc.) below this comment you +# absolutely need to make sure that the correct permissions are applied! +# chown ${STACKABLE_USER_UID}:0 +# ---------------------------------------- + USER ${STACKABLE_USER_UID} WORKDIR /stackable/spark diff --git a/stackable-base/Dockerfile b/stackable-base/Dockerfile index b7184dcc3..74460f534 100644 --- a/stackable-base/Dockerfile +++ b/stackable-base/Dockerfile @@ -155,7 +155,7 @@ chown ${STACKABLE_USER_UID}:0 /stackable/.bashrc chown ${STACKABLE_USER_UID}:0 /stackable/.profile cp /root/.curlrc /stackable/.curlrc -chown stackable:0 /stackable/.curlrc +chown ${STACKABLE_USER_UID}:0 /stackable/.curlrc # CVE-2023-37920: Remove "e-Tugra" root certificates # e-Tugra's root certificates were subject to an investigation prompted by reporting of security issues in their systems diff --git a/statsd_exporter/Dockerfile b/statsd_exporter/Dockerfile index 89195f078..a64efe36a 100644 --- a/statsd_exporter/Dockerfile +++ b/statsd_exporter/Dockerfile @@ -3,10 +3,11 @@ FROM stackable/image/stackable-base ARG PRODUCT +ARG STACKABLE_USER_UID WORKDIR /statsd_exporter -RUN --mount=type=cache,id=go-statsd-exporter,uid=1000,target=/go_cache < /stackable/package_manifest.txt && \ rm -rf /var/cache/yum -USER stackable WORKDIR /stackable # Copy over the ZooKeeper binary folder -COPY --chown=stackable:stackable --from=builder /stackable/apache-zookeeper-${PRODUCT}-bin /stackable/apache-zookeeper-${PRODUCT}-bin/ -COPY --chown=stackable:stackable --from=builder /stackable/jmx /stackable/jmx/ +COPY --chown=${STACKABLE_USER_UID}:0 --from=builder /stackable/apache-zookeeper-${PRODUCT}-bin /stackable/apache-zookeeper-${PRODUCT}-bin/ +COPY --chown=${STACKABLE_USER_UID}:0 --from=builder /stackable/jmx /stackable/jmx/ COPY zookeeper/licenses /licenses # Add link pointing from /stackable/zookeeper to /stackable/apache-zookeeper-${PRODUCT}-bin/ # to preserve the folder name with the version. -RUN ln -s /stackable/apache-zookeeper-${PRODUCT}-bin/ /stackable/zookeeper +RUN <