-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #280 from netlogix/feature/solr-9.5
- Loading branch information
Showing
3 changed files
with
44 additions
and
35 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
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
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,34 +1,43 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM solr:8.11.2 as builder | ||
FROM solr:9.5.0 as builder | ||
|
||
ENV TYPO3_SOLR=11.5.0 \ | ||
TYPO3_SOLR_DOWNLOAD_SHA512="a0c0181993606dbaa587520e8aa8988f1b0eb845215828cf31df0dc181497ab4932db03359bc89655366197247210b4a82cbba1b7bcc5abba85545811e17eefe" | ||
ENV TYPO3_SOLR=12.0.3 \ | ||
TYPO3_SOLR_DOWNLOAD_SHA512="882f24a44d221f5d85a2066ab1235c9aedcd31c8a8f2009f9343b73de2931fd354fed6a8175fe18fa6fa0c284dd07d428c4f547f24875129e5a1d57c5ffd283f" | ||
|
||
USER root | ||
RUN set -ex; \ | ||
apt-get update; \ | ||
apt-get -y install wget unzip; \ | ||
SOLR_DOWNLOAD_URL="https://github.com/TYPO3-Solr/ext-solr/releases/download/$TYPO3_SOLR/solr_$TYPO3_SOLR.zip"; \ | ||
wget -t 10 --max-redirect 4 --retry-connrefused -nv "$SOLR_DOWNLOAD_URL" -O "/tmp/solr.zip"; \ | ||
echo "$TYPO3_SOLR_DOWNLOAD_SHA512 /tmp/solr.zip" | sha512sum -c -; \ | ||
unzip /tmp/solr.zip -d /tmp/solr; | ||
|
||
RUN sed -i "s|name=core_|name=website-|i" /tmp/solr/Resources/Private/Solr/cores/*/core.properties \ | ||
&& cd /tmp/solr/Resources/Private/Solr/configsets/ext_solr_11_5_0/conf \ | ||
&& for f in _schema_analysis_*_core_*.json; do mv "$f" "$(echo "$f" | sed s/core_/website-/)"; done | ||
|
||
FROM solr:8.11.2 | ||
|
||
ENV SOLR_LOG_LEVEL=WARN \ | ||
RUN apt-get update && \ | ||
apt-get -y install wget tar && \ | ||
SOLR_DOWNLOAD_URL="https://github.com/TYPO3-Solr/ext-solr/archive/${TYPO3_SOLR}.tar.gz" && \ | ||
wget -t 10 --max-redirect 4 --retry-connrefused -nv "$SOLR_DOWNLOAD_URL" -O "/tmp/solr.tar.gz" && \ | ||
sha512sum /tmp/solr.tar.gz && \ | ||
echo "$TYPO3_SOLR_DOWNLOAD_SHA512 /tmp/solr.tar.gz" | sha512sum -c - && \ | ||
mkdir -p /tmp/solr && \ | ||
tar -zxvf /tmp/solr.tar.gz -C /tmp/solr --strip-components=1; | ||
|
||
FROM solr:9.5.0 | ||
ENV TERM=linux \ | ||
SOLR_LOG_LEVEL=WARN \ | ||
SOLR_PORT=8983 \ | ||
HEALTHCHECK_CORE=website-generic | ||
HEALTHCHECK_CORE=core_generic | ||
|
||
ARG SOLR_UNIX_UID="8983" | ||
ARG SOLR_UNIX_GID="8983" | ||
|
||
USER root | ||
RUN rm -fR /opt/solr/server/solr/* | ||
RUN rm -fR /opt/solr/server/solr/* \ | ||
&& usermod --non-unique --uid "${SOLR_UNIX_UID}" solr \ | ||
&& groupmod --non-unique --gid "${SOLR_UNIX_GID}" solr \ | ||
&& chown -R solr:solr /var/solr /opt/solr \ | ||
&& apt update && apt upgrade -y && apt install sudo -y \ | ||
&& echo "# EXT:solr relevant changes: " >> /etc/default/solr.in.sh \ | ||
&& echo "SOLR_ENABLE_REMOTE_STREAMING=true" >> /etc/default/solr.in.sh \ | ||
&& echo "SOLR_ENABLE_STREAM_BODY=true" >> /etc/default/solr.in.sh \ | ||
&& echo "# END: EXT:solr" >> /etc/default/solr.in.sh | ||
|
||
USER solr | ||
|
||
COPY --from=builder --chown=solr:solr /tmp/solr/Resources/Private/Solr /var/solr/data | ||
COPY --from=builder --chown=solr:solr /tmp/solr/Resources/Private/Solr/ /var/solr/data | ||
RUN mkdir -p /var/solr/data/data | ||
|
||
HEALTHCHECK --interval=2s --timeout=20s --retries=10 CMD curl -s -A 'healthcheck' http://localhost:$SOLR_PORT/solr/$HEALTHCHECK_CORE/admin/ping?wt=json | grep -q '"status":"OK"' | ||
|