You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2022/08/03 21:21:51 UTC

[solr] branch main updated: SOLR-16323: Use the Solr User ID for the Dockerfile (#961)

This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 7cdc15e9a8a SOLR-16323: Use the Solr User ID for the Dockerfile (#961)
7cdc15e9a8a is described below

commit 7cdc15e9a8ada02a51744c3926b6a6d9cd576fc4
Author: Houston Putman <ho...@apache.org>
AuthorDate: Wed Aug 3 17:21:44 2022 -0400

    SOLR-16323: Use the Solr User ID for the Dockerfile (#961)
---
 solr/CHANGES.txt                               | 2 ++
 solr/docker/templates/Dockerfile.body.template | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 1b506740eca..24a0db72b10 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -64,6 +64,8 @@ Improvements
 * SOLR-16257: Improve ZkStateReader to avoid race condition between collectionWatches and watchedCollectionStates
   (Patson Luk, Houston Putman, Mike Drob)
 
+* SOLR-16323: The Docker image now uses the Solr User ID instead of the User Name, helps with non-root checks (Houston Putman)
+
 Optimizations
 ---------------------
 * SOLR-16120: Optimise hl.fl expansion. (Christine Poerschke, David Smiley, Mike Drob)
diff --git a/solr/docker/templates/Dockerfile.body.template b/solr/docker/templates/Dockerfile.body.template
index 58b93ae86fa..27ea08dc4a5 100644
--- a/solr/docker/templates/Dockerfile.body.template
+++ b/solr/docker/templates/Dockerfile.body.template
@@ -76,7 +76,7 @@ RUN set -ex; \
 VOLUME /var/solr
 EXPOSE 8983
 WORKDIR /opt/solr
-USER $SOLR_USER
+USER $SOLR_UID
 
 ENTRYPOINT ["docker-entrypoint.sh"]
 CMD ["solr-foreground"]