Add support for accessing internal IP

Pterodactyl/Panel#613
This commit is contained in:
Dane Everitt 2017-10-09 23:09:17 -05:00
parent 5367bbab88
commit ce771b8866
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
2 changed files with 5 additions and 3 deletions

View File

@ -13,8 +13,7 @@ RUN apk update \
&& adduser -D -h /home/container container && adduser -D -h /home/container container
USER container USER container
ENV USER container ENV USER=container HOME=/home/container
ENV HOME /home/container
WORKDIR /home/container WORKDIR /home/container

View File

@ -1,11 +1,14 @@
#!/bin/bash #!/bin/bash
sleep 5 sleep 2
cd /home/container cd /home/container
# Output Current Java Version # Output Current Java Version
java -version java -version
# Make internal Docker IP address available to processes.
export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`
# Replace Startup Variables # Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":/home/container$ ${MODIFIED_STARTUP}" echo ":/home/container$ ${MODIFIED_STARTUP}"