Skip to content

Commit

Permalink
Merge 457550a into f55ca6e
Browse files Browse the repository at this point in the history
  • Loading branch information
kaladay authored Jan 12, 2023
2 parents f55ca6e + 457550a commit c608e3a
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions solr/Dockerfile
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

0 comments on commit c608e3a

Please sign in to comment.