Added Dockerfile and entrypoint to work with Zulu on Debian

This commit is contained in:
WGOS 2019-10-25 22:01:49 +03:00
parent e15a911636
commit 8e74f0eda6
2 changed files with 38 additions and 0 deletions

21
Dockerfile Normal file
View File

@ -0,0 +1,21 @@
# ----------------------------------
# Pterodactyl Core Dockerfile
# Environment: Java (glibc support)
# Minimum Panel Version: 0.6.0
# ----------------------------------
FROM azul/zulu-openjdk-debian:8
LABEL author="WGOS" maintainer="wgos@wgos.org"
RUN apt update && apt upgrade -y \
&& apt install -y curl ca-certificates openssl git tar sqlite fontconfig tzdata iproute2 \
&& useradd -d /home/container -m container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]

17
entrypoint.sh Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
cd /home/container
echo "Running on Debian $(cat /etc/debian_version)"
# Output Current 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
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":/home/container$ ${MODIFIED_STARTUP}"
# Run the Server
eval ${MODIFIED_STARTUP}