Skip to content

Commit

Permalink
Merge pull request Aspen-Discovery#1751 from thekesolutions/solr_new_…
Browse files Browse the repository at this point in the history
…version

Solr Dockerfile has been fixed
  • Loading branch information
mdnoble73 authored Apr 8, 2024
2 parents fae2020 + 6ab67f5 commit 09224aa
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions docker/solr/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM solr:8.11.2
USER root

#Install dependencies
RUN apt-get update \
&& apt-get install -y \
Expand All @@ -8,7 +9,26 @@ RUN apt-get update \
sed \
&& rm -rf /var/lib/apt/lists/*

COPY data_dir_setup/solr7/ /opt/solr/server/solr/configsets
#Set environment variables for Solr
ENV SOLR_INSTALL_DIR=/opt/solr
ENV SOLR_LOGS_DIR=/var/solr/logs
ENV SOLR_DATA_DIR=/var/solr/data
ENV SOLR_USER=solr
#Set where Solr will look for configsets
ENV SOLR_HOME=$SOLR_INSTALL_DIR/server/solr
RUN usermod -d $SOLR_HOME ${SOLR_USER}

#Copy configset for each core
COPY aspen-discovery/data_dir_setup/solr7/ ${SOLR_HOME}/configsets
RUN chown -R ${SOLR_USER}:${SOLR_GROUP} ${SOLR_HOME}/configsets

#Do to solr owner of /var/solr to let this user write on it
RUN chown -R solr:solr /var/solr
RUN chown -R solr:solr /opt/solr/server/solr/configsets/
USER solr

#Init as solr
USER ${SOLR_USER}

#Init in Solr home
WORKDIR ${SOLR_HOME}


0 comments on commit 09224aa

Please sign in to comment.