[Solr] Use new Solr base
parent
97c2fe9fe1
commit
fb22540f74
|
@ -1,11 +1,23 @@
|
||||||
FROM solr:7.7-alpine
|
FROM solr:7.7-slim
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
|
ENV GOSU_VERSION 1.11
|
||||||
|
|
||||||
COPY docker-entrypoint.sh /
|
COPY docker-entrypoint.sh /
|
||||||
COPY solr-config-7.7.0.xml /
|
COPY solr-config-7.7.0.xml /
|
||||||
COPY solr-schema-7.7.0.xml /
|
COPY solr-schema-7.7.0.xml /
|
||||||
|
|
||||||
|
RUN dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
|
||||||
RUN apk --no-cache add su-exec curl tzdata \
|
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
|
||||||
|
&& chmod +x /usr/local/bin/gosu \
|
||||||
|
&& gosu nobody true \
|
||||||
|
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
tzdata \
|
||||||
|
curl \
|
||||||
|
bash \
|
||||||
|
&& apt-get autoclean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& chmod +x /docker-entrypoint.sh \
|
&& chmod +x /docker-entrypoint.sh \
|
||||||
&& sync \
|
&& sync \
|
||||||
&& bash /docker-entrypoint.sh --bootstrap
|
&& bash /docker-entrypoint.sh --bootstrap
|
||||||
|
|
|
@ -37,10 +37,10 @@ if [[ "${1}" == "--bootstrap" ]]; then
|
||||||
rm /opt/solr/server/solr/configsets/_default/conf/managed-schema
|
rm /opt/solr/server/solr/configsets/_default/conf/managed-schema
|
||||||
|
|
||||||
echo "Starting local Solr instance to setup configuration"
|
echo "Starting local Solr instance to setup configuration"
|
||||||
su-exec solr start-local-solr
|
gosu solr start-local-solr
|
||||||
|
|
||||||
echo "Creating core \"dovecot-fts\""
|
echo "Creating core \"dovecot-fts\""
|
||||||
su-exec solr /opt/solr/bin/solr create -c "dovecot-fts"
|
gosu solr /opt/solr/bin/solr create -c "dovecot-fts"
|
||||||
|
|
||||||
# See https://github.com/docker-solr/docker-solr/issues/27
|
# See https://github.com/docker-solr/docker-solr/issues/27
|
||||||
echo "Checking core"
|
echo "Checking core"
|
||||||
|
@ -52,10 +52,10 @@ if [[ "${1}" == "--bootstrap" ]]; then
|
||||||
echo "Created core \"dovecot-fts\""
|
echo "Created core \"dovecot-fts\""
|
||||||
|
|
||||||
echo "Stopping local Solr"
|
echo "Stopping local Solr"
|
||||||
su-exec solr stop-local-solr
|
gosu solr stop-local-solr
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec su-exec solr solr-foreground
|
exec gosu solr solr-foreground
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue