mirror of
https://github.com/Lovinoes/images.git
synced 2024-12-21 16:37:45 -05:00
Create entrypoint.sh
This commit is contained in:
parent
3c25e5f64b
commit
518ed107de
1 changed files with 18 additions and 0 deletions
18
java-corretto/entrypoint.sh
Normal file
18
java-corretto/entrypoint.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
cd /home/container || exit 1
|
||||
|
||||
YELLOW='\033[0;33m'
|
||||
RESET_COLOR='\033[0m'
|
||||
|
||||
java -version
|
||||
|
||||
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
||||
export INTERNAL_IP
|
||||
|
||||
# Replace Startup Variables
|
||||
# shellcheck disable=SC2086
|
||||
MODIFIED_STARTUP=$(eval echo "$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g')")
|
||||
echo -e "${YELLOW}[Startup Command]: ${MODIFIED_STARTUP} ${RESET_COLOR}"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
exec ${MODIFIED_STARTUP}
|
Loading…
Reference in a new issue