blob: 06299257da830ec9df28238431140346c1fc1a98 [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001FROM solr:7.7-slim
2
3USER root
4
5ENV GOSU_VERSION 1.11
6
7COPY solr.sh /
8COPY solr-config-7.7.0.xml /
9COPY solr-schema-7.7.0.xml /
10
11RUN dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
12 && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
13 && chmod +x /usr/local/bin/gosu \
14 && gosu nobody true \
15 && apt-get update && apt-get install -y --no-install-recommends \
16 tzdata \
17 curl \
18 bash \
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010019 zip \
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010020 && apt-get autoclean \
21 && rm -rf /var/lib/apt/lists/* \
22 && chmod +x /solr.sh \
23 && sync \
24 && bash /solr.sh --bootstrap
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010025
26RUN zip -q -d /opt/solr/server/lib/ext/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
27
28RUN apt remove zip -y
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010029
30CMD ["/solr.sh"]