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:25:15 UTC

[solr] branch branch_9x 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 branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


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

commit 6e6b0f8159b9c3448f8dfab8782fcd05e1661907
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)
    
    (cherry picked from commit 7cdc15e9a8ada02a51744c3926b6a6d9cd576fc4)
---
 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 614aeba0fbe..6343babd18c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -42,6 +42,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"]