Commit 9dc567ee authored by Kirill's avatar Kirill
Browse files

add Dockerfile

parent c512bf08
FROM gradle:6.5.1-jdk11 AS builder
# build target jar
WORKDIR /solr_gradle
COPY solr_gradle/build.gradle solr_gradle/settings.gradle ./
COPY solr_gradle/src/ src/
RUN gradle jar
FROM solr:8.5
# solr build with our plugin
USER root
RUN mkdir /opt/solr/custom_plugins/
RUN chown -R solr:solr /opt/solr/custom_plugins/
RUN chown -R solr:solr /opt/solr/server/solr/configsets
USER solr
COPY --chown=solr:solr demo /opt/solr/server/solr/configsets/demo
COPY --from=builder --chown=solr:solr /solr_gradle/build/libs/my-fuzzy.jar /opt/solr/custom_plugins/my-fuzzy.jar
COPY docker/init-suggest.sh /opt/docker-solr/scripts
#!/bin/bash
#
# Hacked solr-precreate version
set -e
echo "Executing $0" "$@"
if [[ "${VERBOSE:-}" == "yes" ]]; then
set -x
fi
# init script for handling an empty /var/solr
/opt/docker-solr/scripts/init-var-solr
. /opt/docker-solr/scripts/run-initdb
/opt/docker-solr/scripts/precreate-core "suggest_documents" "/opt/solr/server/solr/configsets/demo"
# Provide path to custom_plugins location.
exec solr-fg -Dsolr.sharedLib=/opt/solr/custom_plugins/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment