Skip to content

Commit 7964be4

Browse files
ibexa-yunaadamwojs
authored andcommitted
Create Dockerfile
1 parent d6a3fb9 commit 7964be4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# syntax=docker/dockerfile:1
2+
FROM solr:8.11.2
3+
4+
USER root
5+
ENV IBEXA_TEMPLATE_DIR=/opt/solr/server/ibexa/template
6+
7+
RUN mkdir -p ${IBEXA_TEMPLATE_DIR}
8+
COPY src/lib/Resources/config/solr/ ${IBEXA_TEMPLATE_DIR}/
9+
10+
RUN set -eux; \
11+
mkdir -p /opt/solr/server/ibexa; \
12+
for f in solrconfig.xml stopwords.txt synonyms.txt; do \
13+
cp /opt/solr/server/solr/configsets/_default/conf/$f ${IBEXA_TEMPLATE_DIR}/; \
14+
done; \
15+
cp /opt/solr/server/solr/solr.xml /opt/solr/server/ibexa/
16+
17+
RUN sed -i.bak '/<updateRequestProcessorChain name="add-unknown-fields-to-the-schema"/,/<\/updateRequestProcessorChain>/d' \
18+
${IBEXA_TEMPLATE_DIR}/solrconfig.xml \
19+
&& sed -i '/<autoSoftCommit>/,/<\/autoSoftCommit>/c\<autoSoftCommit>\n <maxTime>${solr.autoSoftCommit.maxTime:20}</maxTime>\n</autoSoftCommit>' \
20+
${IBEXA_TEMPLATE_DIR}/solrconfig.xml
21+
22+
23+
USER solr
24+
ENV SOLR_CORE=collection1
25+
CMD ["bash", "-c", "solr-precreate \"$SOLR_CORE\" \"$IBEXA_TEMPLATE_DIR\""]

0 commit comments

Comments
 (0)