Skip to content

Commit

Permalink
feat(java): add Liberica java LTS images
Browse files Browse the repository at this point in the history
  • Loading branch information
Software-Noob committed Nov 12, 2023
1 parent 8cd4ce1 commit ce51a6f
Show file tree
Hide file tree
Showing 8 changed files with 211 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/java-corretto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:

jobs:
build_and_push:
name: "java_${{ matrix.tag }}corretto"
name: "java_${{ matrix.tag }}_corretto"
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/java-liberica.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: build java

on:
workflow_dispatch:
schedule:
- cron: "0 17 1,15 * *" # bi-weekly on 1st and 15th calendar day at 17:00
push:
branches:
- main
paths:
- java-liberica/**

permissions:
actions: read
packages: write

concurrency:
group: java-liberica-${{ github.ref }}-1
cancel-in-progress: true

jobs:
push:
name: "java_${{ matrix.tag }}_liberica"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag:
- 8
- 11
- 17
- 21
steps:
- name: Git checkout for Github repository workspace
uses: actions/checkout@v4

- name: Setup QEMU for multiarch builds
uses: docker/setup-qemu-action@v3

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug

- name: Login to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image
uses: docker/build-push-action@v5
with:
context: ./java-liberica
file: ./java-liberica/${{ matrix.tag }}/Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: |
ghcr.io/software-noob/pterodactyl-images:java_${{ matrix.tag }}_liberica
60 changes: 36 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,33 @@ Navigate to `Admin Panel -> Nests -> Select your egg`. Add Docker image URL(s) f

| Image | Supported platforms |
| ----------------------------------------------------------------------------------------------------------- | ------------------- |
| [Java Azul Zulu](https://github.com/Software-Noob/pterodactyl-images#java-azul-zulu-amd64arm64) | AMD64, ARM64 |
| [Java Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images#java-amazon-corretto-amd64arm64) | AMD64, ARM64 |
| [Java Azul Zulu](https://github.com/Software-Noob/pterodactyl-images#java-azul-zulu-amd64arm64) | AMD64, ARM64 |
| [Java Dragonwell](https://github.com/Software-Noob/pterodactyl-images#java-dragonwell-amd64arm64) | AMD64, ARM64 |
| [Java Eclipse Temurin](https://github.com/Software-Noob/pterodactyl-images#java-eclipse-temurin-amd64arm64) | AMD64, ARM64 |
| [Java GraalVM](https://github.com/Software-Noob/pterodactyl-images#java-graalvm-amd64arm64) | AMD64, ARM64 |
| [Java Liberica](https://github.com/Software-Noob/pterodactyl-images#java-liberica-amd64arm64) | AMD64, ARM64 |
| [Java OpenJ9](https://github.com/Software-Noob/pterodactyl-images#java-openj9-amd64) | AMD64 |
| [Java Dragonwell](https://github.com/Software-Noob/pterodactyl-images#java-dragonwell-amd64arm64) | AMD64, ARM64 |
| [Java Shenandoah](https://github.com/Software-Noob/pterodactyl-images#java-shenandoah-amd64arm64) | AMD64, ARM64 |
| [Node.js](https://github.com/Software-Noob/pterodactyl-images#nodejs-amd64arm64) | AMD64, ARM64 |
| [Python](https://github.com/Software-Noob/pterodactyl-images#python-amd64arm64) | AMD64, ARM64 |
| [Sourcemod](https://github.com/Software-Noob/pterodactyl-images#sourcemod-amd64) | AMD64 |

### Java Amazon Corretto [AMD64/ARM64]

- [Java 8 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/8)
- `ghcr.io/software-noob/pterodactyl-images:java_8_corretto`
- [Java 11 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/11)
- `ghcr.io/software-noob/pterodactyl-images:java_11_corretto`
- [Java 17 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/17)
- `ghcr.io/software-noob/pterodactyl-images:java_17_corretto`
- [Java 19 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/19)
- `ghcr.io/software-noob/pterodactyl-images:java_19_corretto`
- [Java 20 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/20)
- `ghcr.io/software-noob/pterodactyl-images:java_20_corretto`
- [Java 21 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/21)
- `ghcr.io/software-noob/pterodactyl-images:java_21_corretto`

### Java Azul Zulu [AMD64/ARM64]

- [Java 8 Zulu](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-zulu/8)
Expand All @@ -44,20 +60,14 @@ Navigate to `Admin Panel -> Nests -> Select your egg`. Add Docker image URL(s) f
- [Java 21 Zulu](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-zulu/21)
- `ghcr.io/software-noob/pterodactyl-images:java_21_zulu`

### Java Amazon Corretto [AMD64/ARM64]
### Java Dragonwell [AMD64/ARM64]

- [Java 8 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/8)
- `ghcr.io/software-noob/pterodactyl-images:java_8_corretto`
- [Java 11 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/11)
- `ghcr.io/software-noob/pterodactyl-images:java_11_corretto`
- [Java 17 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/17)
- `ghcr.io/software-noob/pterodactyl-images:java_17_corretto`
- [Java 19 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/19)
- `ghcr.io/software-noob/pterodactyl-images:java_19_corretto`
- [Java 20 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/20)
- `ghcr.io/software-noob/pterodactyl-images:java_20_corretto`
- [Java 21 Amazon Corretto](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-corretto/21)
- `ghcr.io/software-noob/pterodactyl-images:java_21_corretto`
- [Java 8 Dragonwell](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-dragonwell/8)
- `ghcr.io/software-noob/pterodactyl-images:java_8_dragonwell`
- [Java 11 Dragonwell](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-dragonwell/11)
- `ghcr.io/software-noob/pterodactyl-images:java_11_dragonwell`
- [Java 17 Dragonwell](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-dragonwell/17)
- `ghcr.io/software-noob/pterodactyl-images:java_17_dragonwell`

### Java Eclipse Temurin [AMD64/ARM64]

Expand Down Expand Up @@ -91,6 +101,17 @@ Navigate to `Admin Panel -> Nests -> Select your egg`. Add Docker image URL(s) f
- [Java 21 GraalVM JDK](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-graalvm/21)
- `ghcr.io/software-noob/pterodactyl-images:java_21_graalvm`

### Java Liberica [AMD64/ARM64]

- [Java 8 Liberica](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-liberica/8)
- `ghcr.io/software-noob/pterodactyl-images:java_8_liberica`
- [Java 11 Liberica](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-liberica/11)
- `ghcr.io/software-noob/pterodactyl-images:java_11_liberica`
- [Java 17 Liberica](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-liberica/17)
- `ghcr.io/software-noob/pterodactyl-images:java_17_liberica`
- [Java 21 Liberica](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-liberica/21)
- `ghcr.io/software-noob/pterodactyl-images:java_21_liberica`

### Java OpenJ9 [AMD64]

- [Java 8 OpenJ9](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-openj9/8)
Expand All @@ -106,15 +127,6 @@ Navigate to `Admin Panel -> Nests -> Select your egg`. Add Docker image URL(s) f
- [Java 20 OpenJ9](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-openj9/20)
- `ghcr.io/software-noob/pterodactyl-images:java_20_openj9`

### Java Dragonwell [AMD64/ARM64]

- [Java 8 Dragonwell](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-dragonwell/8)
- `ghcr.io/software-noob/pterodactyl-images:java_8_dragonwell`
- [Java 11 Dragonwell](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-dragonwell/11)
- `ghcr.io/software-noob/pterodactyl-images:java_11_dragonwell`
- [Java 17 Dragonwell](https://github.com/Software-Noob/pterodactyl-images/tree/main/java-dragonwell/17)
- `ghcr.io/software-noob/pterodactyl-images:java_17_dragonwell`

### Java Shenandoah Nightly [AMD64/ARM64]

These are nightly builds. Shenandoah GC is by default shipped with Azul, Corretto and Temurin starting with Java 11
Expand Down
23 changes: 23 additions & 0 deletions java-liberica/11/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM bellsoft/liberica-openjdk-debian:11

LABEL author="Softwarenoob" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/Software-Noob/pterodactyl-images"
LABEL org.opencontainers.image.licenses="MIT"

RUN apt-get update -y \
&& apt-get install -y --no-install-recommends curl ca-certificates openssl git tar sqlite3 fontconfig libfreetype6 libstdc++6 lsof build-essential tzdata iproute2 locales \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m -d /home/container container \
&& locale-gen en_US.UTF-8

ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8

USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/bash", "/entrypoint.sh" ]
23 changes: 23 additions & 0 deletions java-liberica/17/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM bellsoft/liberica-openjdk-debian:17

LABEL author="Softwarenoob" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/Software-Noob/pterodactyl-images"
LABEL org.opencontainers.image.licenses="MIT"

RUN apt-get update -y \
&& apt-get install -y --no-install-recommends curl ca-certificates openssl git tar sqlite3 fontconfig libfreetype6 libstdc++6 lsof build-essential tzdata iproute2 locales \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m -d /home/container container \
&& locale-gen en_US.UTF-8

ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8

USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/bash", "/entrypoint.sh" ]
23 changes: 23 additions & 0 deletions java-liberica/21/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM bellsoft/liberica-openjdk-debian:21

LABEL author="Softwarenoob" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/Software-Noob/pterodactyl-images"
LABEL org.opencontainers.image.licenses="MIT"

RUN apt-get update -y \
&& apt-get install -y --no-install-recommends curl ca-certificates openssl git tar sqlite3 fontconfig libfreetype6 libstdc++6 lsof build-essential tzdata iproute2 locales \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m -d /home/container container \
&& locale-gen en_US.UTF-8

ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8

USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/bash", "/entrypoint.sh" ]
23 changes: 23 additions & 0 deletions java-liberica/8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM bellsoft/liberica-openjdk-debian:8

LABEL author="Softwarenoob" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/Software-Noob/pterodactyl-images"
LABEL org.opencontainers.image.licenses="MIT"

RUN apt-get update -y \
&& apt-get install -y --no-install-recommends curl ca-certificates openssl git tar sqlite3 fontconfig libfreetype6 libstdc++6 lsof build-essential tzdata iproute2 locales \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -m -d /home/container container \
&& locale-gen en_US.UTF-8

ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8

USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/bash", "/entrypoint.sh" ]
22 changes: 22 additions & 0 deletions java-liberica/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
cd /home/container || exit 1

# Configure colors
CYAN='\033[0;36m'
RESET_COLOR='\033[0m'

# Print the current Java Version
java -version

# Set environment variable that holds the Internal Docker IP
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
export INTERNAL_IP

# Replace Startup Variables
# shellcheck disable=SC2086
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
echo -e "${CYAN}STARTUP /home/container: ${MODIFIED_STARTUP} ${RESET_COLOR}"

# Run the Server
# shellcheck disable=SC2086
eval ${MODIFIED_STARTUP}

0 comments on commit ce51a6f

Please sign in to comment.