mirror of
https://github.com/darksaid98/yolks.git
synced 2026-12-01 14:38:59 +00:00
feat(graalvm): ubuntu 24 and webp support
This commit is contained in:
2 files changed
+156
-90
No files matched your search
+78
-45
@@ -1,16 +1,12 @@
|
||||
# ----------------------------------
|
||||
# Pterodactyl Core Dockerfile
|
||||
# Environment: Java
|
||||
# Minimum Panel Version: 1.7.0
|
||||
# ----------------------------------
|
||||
FROM ubuntu:22.04
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG JAVA_VERSION=17
|
||||
|
||||
LABEL author="darksaid98" maintainer="[email protected]"
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/darksaid98/pterodactyl-graalvm"
|
||||
LABEL org.opencontainers.image.source="https://github.com/darksaid98/yolks"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV JAVA_HOME /opt/java/graalvm
|
||||
@@ -19,47 +15,84 @@ ENV PATH $JAVA_HOME/bin:$PATH
|
||||
# Default to UTF-8 file.encoding
|
||||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||
|
||||
# Environment Setup
|
||||
RUN apt update -y \
|
||||
&& apt install -y --no-install-recommends \
|
||||
curl \
|
||||
wget \
|
||||
fontconfig \
|
||||
ca-certificates \
|
||||
p11-kit \
|
||||
binutils \
|
||||
tzdata \
|
||||
locales \
|
||||
lsof \
|
||||
openssl \
|
||||
git \
|
||||
git-lfs \
|
||||
tar \
|
||||
sqlite3 \
|
||||
iproute2 \
|
||||
libfreetype6 \
|
||||
tini \
|
||||
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
|
||||
&& locale-gen en_US.UTF-8 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# Java base environment
|
||||
RUN set -eux; \
|
||||
apt update -y; \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
|
||||
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
|
||||
curl \
|
||||
wget \
|
||||
# gnupg required to verify the signature
|
||||
gnupg \
|
||||
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
|
||||
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
|
||||
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
|
||||
fontconfig \
|
||||
# utilities for keeping Ubuntu and OpenJDK CA certificates in sync
|
||||
# https://github.com/adoptium/containers/issues/293
|
||||
ca-certificates p11-kit \
|
||||
# jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351
|
||||
# Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
|
||||
binutils \
|
||||
tzdata \
|
||||
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
|
||||
locales \
|
||||
; \
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \
|
||||
locale-gen en_US.UTF-8; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# GraalVM Install
|
||||
RUN case ${TARGETPLATFORM} in \
|
||||
"linux/amd64") ARCH=x64 ;; \
|
||||
"linux/arm64") ARCH=aarch64 ;; \
|
||||
esac \
|
||||
&& wget --progress=dot:giga -O /tmp/graalvm.tar.gz https://download.oracle.com/graalvm/${JAVA_VERSION}/latest/graalvm-jdk-${JAVA_VERSION}_linux-${ARCH}_bin.tar.gz \
|
||||
&& mkdir -p "${JAVA_HOME}" \
|
||||
&& tar --extract \
|
||||
--file /tmp/graalvm.tar.gz \
|
||||
--directory "${JAVA_HOME}" \
|
||||
--strip-components 1 \
|
||||
--no-same-owner \
|
||||
&& rm -rf /tmp/graalvm.tar.gz
|
||||
RUN set -eux; \
|
||||
case ${TARGETPLATFORM} in \
|
||||
"linux/amd64") ARCH=x64 ;; \
|
||||
"linux/arm64") ARCH=aarch64 ;; \
|
||||
esac; \
|
||||
wget --progress=dot:giga -O /tmp/graalvm.tar.gz https://download.oracle.com/graalvm/${JAVA_VERSION}/latest/graalvm-jdk-${JAVA_VERSION}_linux-${ARCH}_bin.tar.gz; \
|
||||
mkdir -p "$JAVA_HOME"; \
|
||||
tar --extract \
|
||||
--file /tmp/graalvm.tar.gz \
|
||||
--directory "$JAVA_HOME" \
|
||||
--strip-components 1 \
|
||||
--no-same-owner \
|
||||
; \
|
||||
rm -rf /tmp/graalvm.tar.gz; \
|
||||
# https://github.com/docker-library/openjdk/issues/331#issuecomment-498834472
|
||||
find "$JAVA_HOME/lib" -name '*.so' -exec dirname '{}' ';' | sort -u > /etc/ld.so.conf.d/docker-openjdk.conf; \
|
||||
ldconfig; \
|
||||
# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840
|
||||
# https://openjdk.java.net/jeps/341
|
||||
java -Xshare:dump;
|
||||
|
||||
# Java info
|
||||
RUN echo "javac --version"; javac --version \
|
||||
&& echo "java --version"; java --version
|
||||
# Verify Java installation
|
||||
RUN set -eux; \
|
||||
echo "Verifying install ..."; \
|
||||
fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java; \
|
||||
echo "javac --version"; javac --version; \
|
||||
echo "java --version"; java --version; \
|
||||
echo "Complete."
|
||||
|
||||
# Misc standard packages to ship with image
|
||||
RUN set -eux; \
|
||||
apt update -y; \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y \
|
||||
curl \
|
||||
lsof \
|
||||
ca-certificates \
|
||||
openssl \
|
||||
git \
|
||||
git-lfs \
|
||||
tar \
|
||||
sqlite3 \
|
||||
fontconfig \
|
||||
tzdata \
|
||||
iproute2 \
|
||||
libfreetype6 \
|
||||
tini \
|
||||
zip \
|
||||
unzip \
|
||||
# WebP utilities for encoding/decoding WebP images
|
||||
webp
|
||||
|
||||
## Setup user and working directory
|
||||
RUN useradd -m -d /home/container -s /bin/bash container
|
||||
|
||||
+78
-45
@@ -1,16 +1,12 @@
|
||||
# ----------------------------------
|
||||
# Pterodactyl Core Dockerfile
|
||||
# Environment: Java
|
||||
# Minimum Panel Version: 1.7.0
|
||||
# ----------------------------------
|
||||
FROM ubuntu:22.04
|
||||
FROM ubuntu:24.04
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG JAVA_VERSION=21
|
||||
|
||||
LABEL author="darksaid98" maintainer="[email protected]"
|
||||
|
||||
LABEL org.opencontainers.image.source="https://github.com/darksaid98/pterodactyl-graalvm"
|
||||
LABEL org.opencontainers.image.source="https://github.com/darksaid98/yolks"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV JAVA_HOME /opt/java/graalvm
|
||||
@@ -19,47 +15,84 @@ ENV PATH $JAVA_HOME/bin:$PATH
|
||||
# Default to UTF-8 file.encoding
|
||||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||
|
||||
# Environment Setup
|
||||
RUN apt update -y \
|
||||
&& apt install -y --no-install-recommends \
|
||||
curl \
|
||||
wget \
|
||||
fontconfig \
|
||||
ca-certificates \
|
||||
p11-kit \
|
||||
binutils \
|
||||
tzdata \
|
||||
locales \
|
||||
lsof \
|
||||
openssl \
|
||||
git \
|
||||
git-lfs \
|
||||
tar \
|
||||
sqlite3 \
|
||||
iproute2 \
|
||||
libfreetype6 \
|
||||
tini \
|
||||
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
|
||||
&& locale-gen en_US.UTF-8 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# Java base environment
|
||||
RUN set -eux; \
|
||||
apt update -y; \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
|
||||
# curl required for historical reasons, see https://github.com/adoptium/containers/issues/255
|
||||
curl \
|
||||
wget \
|
||||
# gnupg required to verify the signature
|
||||
gnupg \
|
||||
# java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
|
||||
# java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
|
||||
# https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
|
||||
fontconfig \
|
||||
# utilities for keeping Ubuntu and OpenJDK CA certificates in sync
|
||||
# https://github.com/adoptium/containers/issues/293
|
||||
ca-certificates p11-kit \
|
||||
# jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351
|
||||
# Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory
|
||||
binutils \
|
||||
tzdata \
|
||||
# locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8
|
||||
locales \
|
||||
; \
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \
|
||||
locale-gen en_US.UTF-8; \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# GraalVM Install
|
||||
RUN case ${TARGETPLATFORM} in \
|
||||
"linux/amd64") ARCH=x64 ;; \
|
||||
"linux/arm64") ARCH=aarch64 ;; \
|
||||
esac \
|
||||
&& wget --progress=dot:giga -O /tmp/graalvm.tar.gz https://download.oracle.com/graalvm/${JAVA_VERSION}/latest/graalvm-jdk-${JAVA_VERSION}_linux-${ARCH}_bin.tar.gz \
|
||||
&& mkdir -p "${JAVA_HOME}" \
|
||||
&& tar --extract \
|
||||
--file /tmp/graalvm.tar.gz \
|
||||
--directory "${JAVA_HOME}" \
|
||||
--strip-components 1 \
|
||||
--no-same-owner \
|
||||
&& rm -rf /tmp/graalvm.tar.gz
|
||||
RUN set -eux; \
|
||||
case ${TARGETPLATFORM} in \
|
||||
"linux/amd64") ARCH=x64 ;; \
|
||||
"linux/arm64") ARCH=aarch64 ;; \
|
||||
esac; \
|
||||
wget --progress=dot:giga -O /tmp/graalvm.tar.gz https://download.oracle.com/graalvm/${JAVA_VERSION}/latest/graalvm-jdk-${JAVA_VERSION}_linux-${ARCH}_bin.tar.gz; \
|
||||
mkdir -p "$JAVA_HOME"; \
|
||||
tar --extract \
|
||||
--file /tmp/graalvm.tar.gz \
|
||||
--directory "$JAVA_HOME" \
|
||||
--strip-components 1 \
|
||||
--no-same-owner \
|
||||
; \
|
||||
rm -rf /tmp/graalvm.tar.gz; \
|
||||
# https://github.com/docker-library/openjdk/issues/331#issuecomment-498834472
|
||||
find "$JAVA_HOME/lib" -name '*.so' -exec dirname '{}' ';' | sort -u > /etc/ld.so.conf.d/docker-openjdk.conf; \
|
||||
ldconfig; \
|
||||
# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840
|
||||
# https://openjdk.java.net/jeps/341
|
||||
java -Xshare:dump;
|
||||
|
||||
# Java info
|
||||
RUN echo "javac --version"; javac --version \
|
||||
&& echo "java --version"; java --version
|
||||
# Verify Java installation
|
||||
RUN set -eux; \
|
||||
echo "Verifying install ..."; \
|
||||
fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java; \
|
||||
echo "javac --version"; javac --version; \
|
||||
echo "java --version"; java --version; \
|
||||
echo "Complete."
|
||||
|
||||
# Misc standard packages to ship with image
|
||||
RUN set -eux; \
|
||||
apt update -y; \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y \
|
||||
curl \
|
||||
lsof \
|
||||
ca-certificates \
|
||||
openssl \
|
||||
git \
|
||||
git-lfs \
|
||||
tar \
|
||||
sqlite3 \
|
||||
fontconfig \
|
||||
tzdata \
|
||||
iproute2 \
|
||||
libfreetype6 \
|
||||
tini \
|
||||
zip \
|
||||
unzip \
|
||||
# WebP utilities for encoding/decoding WebP images
|
||||
webp
|
||||
|
||||
## Setup user and working directory
|
||||
RUN useradd -m -d /home/container -s /bin/bash container
|
||||
|
||||
Reference in new issue
Block a user