#!/bin/bash # # docker-entrypoint for Solr docker set -e # Clear some variables that we don't want runtime unset SOLR_USER SOLR_UID SOLR_GROUP SOLR_GID \ SOLR_CLOSER_URL SOLR_DIST_URL SOLR_ARCHIVE_URL SOLR_DOWNLOAD_URL SOLR_DOWNLOAD_SERVER SOLR_KEYS SOLR_SHA512 if [[ "$VERBOSE" == "yes" ]]; then set -x fi if ! [[ ${SOLR_PORT:-} =~ ^[0-9]+$ ]]; then SOLR_PORT=8983 export SOLR_PORT fi # when invoked with e.g.: docker run solr -help if [ "${1:0:1}" == '-' ]; then set -- solr-foreground "$@" fi # execute command passed in as arguments. # The Dockerfile has specified the PATH to include # /opt/solr/bin (for Solr) and /opt/docker-solr/scripts (for our scripts # like solr-foreground, solr-create, solr-precreate, solr-demo). # Note: if you specify "solr", you'll typically want to add -f to run it in # the foreground. exec "$@"