2 Star 6 Fork 2

Rukiy / alpine-openjdk11

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
entrypoint.sh 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
Rukiy 提交于 2019-10-08 02:22 . 初始化文件
#!/bin/sh
set -e
# In case the user wants only to use java with options
if [ $# -gt 0 ]
then
exec java $@
exit 0
fi
# Behavior when using the /app folder
#
# In the setenv.sh file you may define the following environment
# variables
#
# JAVA_OPTS : a string containing the list of java options to
# pass to the java command.
# eg. JAVA_OPTS="-Xmx1g -Dfile.encoding=utf8"
# APP_ARGS
SETENV_FILE=/app/config/Environment.sh
if [ -r $SETENV_FILE ]
then
source $SETENV_FILE
fi
TMP_JARS_LIST=/tmp/jars_list
find /app -maxdepth 1 -regex '.*.[jw]ar$' > $TMP_JARS_LIST
nb_jars=$(cat $TMP_JARS_LIST | wc -l)
if [ $nb_jars -gt 1 ]
then
echo 'ERROR: You may only have one jar in the /app folder'
echo '==================================================='
cat $TMP_JARS_LIST
exit 1
elif [ $nb_jars -eq 0 ]
then
echo 'ERROR: There should be one and only one jar in the /app folder'
echo '=============================================================='
exit 1
else
CMD="java $JAVA_OPTS -jar $(cat $TMP_JARS_LIST) $APP_ARGS"
echo "Launching the following command:"
echo " |"
echo ' `-> '"$CMD"
echo
exec $CMD
fi
exit 0
Docker
1
https://gitee.com/rukiy/alpine-openjdk11.git
git@gitee.com:rukiy/alpine-openjdk11.git
rukiy
alpine-openjdk11
alpine-openjdk11
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891