diff --git a/docker-compose.yml b/docker-compose.yml index 52dd3bb2..34e172d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -706,6 +706,7 @@ services: args: - SOLR_VERSION=${SOLR_VERSION} - SOLR_DATAIMPORTHANDLER_MYSQL=${SOLR_DATAIMPORTHANDLER_MYSQL} + - SOLR_DATAIMPORTHANDLER_MSSQL=${SOLR_DATAIMPORTHANDLER_MSSQL} volumes: - ${DATA_PATH_HOST}/solr:/opt/solr/server/solr/mycores ports: diff --git a/env-example b/env-example index 286f9b2c..c8e0cbc5 100644 --- a/env-example +++ b/env-example @@ -486,6 +486,7 @@ TC_AWS_STORE_METADATA=False SOLR_VERSION=5.5 SOLR_PORT=8983 SOLR_DATAIMPORTHANDLER_MYSQL=false +SOLR_DATAIMPORTHANDLER_MSSQL=false ### GITLAB ############################################### GITLAB_HOST_HTTP_PORT=8989 diff --git a/solr/Dockerfile b/solr/Dockerfile index ba604a31..c133a6a2 100644 --- a/solr/Dockerfile +++ b/solr/Dockerfile @@ -12,3 +12,13 @@ RUN if [ ${SOLR_DATAIMPORTHANDLER_MYSQL} = true ]; then \ && rm /tmp/mysql_connector.tar.gz \ ;fi +ARG SOLR_DATAIMPORTHANDLER_MSSQL=false +ENV SOLR_DATAIMPORTHANDLER_MSSQL ${SOLR_DATAIMPORTHANDLER_MSSQL} + +# download mssql connector for dataimporthandler +RUN if [ ${SOLR_DATAIMPORTHANDLER_MSSQL} = true ]; then \ + curl -L -o /tmp/mssql-jdbc-7.0.0.jre8.jar "https://github.com/Microsoft/mssql-jdbc/releases/download/v7.0.0/mssql-jdbc-7.0.0.jre8.jar" \ + && mkdir /opt/solr/contrib/dataimporthandler/lib \ + && mv /tmp/mssql-jdbc-7.0.0.jre8.jar "/opt/solr/contrib/dataimporthandler/lib/mssql-jdbc-7.0.0.jre8.jar" \ +;fi +