Skip to content

Commit

Permalink
add java dragonwell as requested
Browse files Browse the repository at this point in the history
  • Loading branch information
gOOvER committed Jan 12, 2025
1 parent 8994dd8 commit 9a239a6
Show file tree
Hide file tree
Showing 6 changed files with 285 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/java-dragonwell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: build java-dragonwell

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
push:
branches:
- main
paths:
- java/dragonwell/**

env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

jobs:
push:
name: "java:dragonwell_${{ matrix.tag }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag:
- 8
- 11
- 17
- 21

steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

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

- uses: docker/build-push-action@v6
with:
context: ./java/dragonwell
file: ./java/dragonwell/${{ matrix.tag }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/goover/java:dragonwell_${{ matrix.tag }}
47 changes: 47 additions & 0 deletions java/dragonwell/11/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM --platform=$TARGETOS/$TARGETARCH alibabadragonwell/dragonwell:11-ubuntu

LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.description="Docker image for Pelican Hosting Panel and Pterodactyl"
LABEL org.opencontainers.image.licenses=AGPL-3.0-or-later


RUN apt update -y \
&& apt -y upgrade

RUN apt install -y \
build-essential \
ca-certificates \
curl \
font-manager \
fontconfig \
git \
iproute2 \
ipset \
locales \
lsof \
openssl \
sqlite3 \
tar \
tzdata \
libfreetype6 \
libstdc++6

RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* \

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD [ "/bin/bash", "/entrypoint.sh" ]
47 changes: 47 additions & 0 deletions java/dragonwell/17/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM --platform=$TARGETOS/$TARGETARCH alibabadragonwell/dragonwell:17-ubuntu

LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.description="Docker image for Pelican Hosting Panel and Pterodactyl"
LABEL org.opencontainers.image.licenses=AGPL-3.0-or-later


RUN apt update -y \
&& apt -y upgrade

RUN apt install -y \
build-essential \
ca-certificates \
curl \
font-manager \
fontconfig \
git \
iproute2 \
ipset \
locales \
lsof \
openssl \
sqlite3 \
tar \
tzdata \
libfreetype6 \
libstdc++6

RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* \

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD [ "/bin/bash", "/entrypoint.sh" ]
47 changes: 47 additions & 0 deletions java/dragonwell/21/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM --platform=$TARGETOS/$TARGETARCH alibabadragonwell/dragonwell:21-ubuntu

LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.description="Docker image for Pelican Hosting Panel and Pterodactyl"
LABEL org.opencontainers.image.licenses=AGPL-3.0-or-later


RUN apt update -y \
&& apt -y upgrade

RUN apt install -y \
build-essential \
ca-certificates \
curl \
font-manager \
fontconfig \
git \
iproute2 \
ipset \
locales \
lsof \
openssl \
sqlite3 \
tar \
tzdata \
libfreetype6 \
libstdc++6

RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* \

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD [ "/bin/bash", "/entrypoint.sh" ]
47 changes: 47 additions & 0 deletions java/dragonwell/8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM --platform=$TARGETOS/$TARGETARCH alibabadragonwell/dragonwell:8-ubuntu

LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.description="Docker image for Pelican Hosting Panel and Pterodactyl"
LABEL org.opencontainers.image.licenses=AGPL-3.0-or-later


RUN apt update -y \
&& apt -y upgrade

RUN apt install -y \
build-essential \
ca-certificates \
curl \
font-manager \
fontconfig \
git \
iproute2 \
ipset \
locales \
lsof \
openssl \
sqlite3 \
tar \
tzdata \
libfreetype6 \
libstdc++6

RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* \

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD [ "/bin/bash", "/entrypoint.sh" ]
43 changes: 43 additions & 0 deletions java/dragonwell/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

#System variables
clear
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'

# Switch to the container's working directory
cd /home/container || exit 1

# Wait for the container to fully initialize
sleep 1

# Default the TZ environment variable to UTC.
TZ=${TZ:-UTC}
export TZ

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

# system informations
echo -e "${BLUE}---------------------------------------------------------------------${NC}"
echo -e "${RED}Java Corretto Image by gOOvER - https://discord.goover.dev${NC}"
echo -e "${BLUE}---------------------------------------------------------------------${NC}"
echo -e "${YELLOW}Linux Distribution: ${RED} $(. /etc/os-release ; echo $PRETTY_NAME)${NC}"
echo -e "${YELLOW}Current timezone: ${RED} $(cat /etc/timezone)${NC}"
echo -e "${YELLOW}Java Version: ${RED} $(java -version) ${NC}"
echo -e "${BLUE}---------------------------------------------------------------------${NC}"

# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
# variable format of "${VARIABLE}" before evaluating the string and automatically
# replacing the values.
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")

# Display the command we're running in the output, and then execute it with the env
# from the container itself.
printf "\033[1m\033[33mcontainer@gameservertech~ \033[0m%s\n" "$PARSED"
# shellcheck disable=SC2086
exec env ${PARSED}

0 comments on commit 9a239a6

Please sign in to comment.