mirror of
https://github.com/apache/lucene.git
synced 2025-02-13 13:35:37 +00:00
2b8d7bcd6a
* Removed docker plugin from gradle builds. * Removed package docker image. * Tasks now have correct inputs/outputs/dependencies. * Move gradle help text to docker folder. * Reduce duplicated Docker layer by doing file removal and chmod in another stage. Co-authored-by: David Smiley <dsmiley@apache.org>
29 lines
961 B
Bash
Executable File
29 lines
961 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Run the init-solr-home script and source any '.sh' scripts in
|
|
# /docker-entrypoint-initdb.d.
|
|
# This script is sourced by some of the solr-* commands, so that
|
|
# you can run eg:
|
|
#
|
|
# mkdir initdb; echo "echo hi" > initdb/hi.sh
|
|
# docker run -v $PWD/initdb:/docker-entrypoint-initdb.d solr
|
|
#
|
|
# and have your script execute before Solr starts.
|
|
#
|
|
# Note: scripts can modify the environment, which will affect
|
|
# subsequent scripts and ultimately Solr. That allows you to set
|
|
# environment variables from your scripts (though you usually just
|
|
# use "docker run -e"). If this is undesirable in your use-case,
|
|
# have your scripts execute a sub-shell.
|
|
|
|
set -e
|
|
|
|
# execute files in /docker-entrypoint-initdb.d before starting solr
|
|
while read -r f; do
|
|
case "$f" in
|
|
*.sh) echo "$0: running $f"; . "$f" ;;
|
|
*) echo "$0: ignoring $f" ;;
|
|
esac
|
|
echo
|
|
done < <(find /docker-entrypoint-initdb.d/ -mindepth 1 -type f | sort -n)
|