-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-entrypoint.sh
executable file
·41 lines (34 loc) · 1.08 KB
/
docker-entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
set -e
if [ "$1" = jetty.sh ]; then
if ! command -v bash >/dev/null 2>&1 ; then
cat >&2 <<- 'EOWARN'
********************************************************************
ERROR: bash not found. Use of jetty.sh requires bash.
********************************************************************
EOWARN
exit 1
fi
cat >&2 <<- 'EOWARN'
********************************************************************
WARNING: Use of jetty.sh from this image is deprecated and may
be removed at some point in the future.
See the documentation for guidance on extending this image:
https://github.com/docker-library/docs/tree/master/jetty
********************************************************************
EOWARN
fi
if ! command -v -- "$1" >/dev/null 2>&1 ; then
set -- java -jar "$JETTY_HOME/start.jar" "$@"
fi
if [ -n "$TMPDIR" ] ; then
case "$JAVA_OPTIONS" in
*-Djava.io.tmpdir=*) ;;
*) JAVA_OPTIONS="-Djava.io.tmpdir=$TMPDIR $JAVA_OPTIONS" ;;
esac
fi
if [ "$1" = "java" -a -n "$JAVA_OPTIONS" ] ; then
shift
set -- java $JAVA_OPTIONS "$@"
fi
exec "$@"