-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
FROM solr:7.7.2-slim | ||
|
||
RUN precreate-core sage-discovery | ||
ARG SOLR_USER="solr" | ||
ARG MAIN_CORE="sage-discovery" | ||
ARG EXTRA_CORES="" | ||
|
||
RUN chmod -R ugo+w /opt/solr/server/solr/ | ||
RUN chmod -R ugo+w /opt/solr/server/logs/ | ||
RUN precreate-core $MAIN_CORE | ||
|
||
COPY config /opt/solr/server/solr/mycores/sage-discovery/conf | ||
COPY config /opt/solr/server/solr/mycores/${MAIN_CORE}/conf | ||
|
||
USER root | ||
|
||
RUN chown -R solr:solr /opt/solr/server/solr/mycores/ | ||
RUN if [ "$EXTRA_CORES" != "" ] ; then \ | ||
for core in $EXTRA_CORES ; do \ | ||
precreate-core $core && \ | ||
cp -R /opt/solr/server/solr/mycores/${MAIN_CORE}/conf /opt/solr/server/solr/mycores/${core}/ || exit 1 ; \ | ||
done \ | ||
fi | ||
|
||
USER solr | ||
RUN chown -R $SOLR_USER:$SOLR_USER /opt/solr/server/solr/mycores/ | ||
RUN chmod -R ugo+w /opt/solr/server/solr /opt/solr/server/logs/ | ||
|
||
USER $SOLR_USER |