Merge pull request #51 from WGOS/java-zulu

Zulu OpenJDK
This commit is contained in:
Dane Everitt 2020-01-19 14:23:04 -08:00 committed by GitHub
commit b3e2fa5a97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 1 deletions

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
# ----------------------------------
# Pterodactyl Core Dockerfile
# Environment: Java (glibc support)
# Minimum Panel Version: 0.6.0
# ----------------------------------
FROM debian:9.11-slim
LABEL author="WGOS" maintainer="wgos@wgos.org"
RUN apt update && apt upgrade -y \
&& apt install -y gnupg \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 \
--recv-keys 0xB1998361219BD9C9 \
&& echo "deb http://repos.azulsystems.com/debian stable main" >> /etc/apt/sources.list.d/zulu.list \
&& mkdir -p /usr/share/man/man1 \
&& apt update \
&& apt install -y curl ca-certificates openssl git tar sqlite fontconfig iproute2 tzdata zre-8 \
&& 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
# Print information
echo "Running on Debian $(cat /etc/debian_version)"
echo "Current timezone is: $(cat /etc/timezone)"
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}