Add more java versions

This commit is contained in:
zontreck 2024-09-03 17:08:39 -07:00
parent c22afc950d
commit 65a0c22968
11 changed files with 169 additions and 1 deletions

8
Jenkinsfile vendored
View file

@ -94,6 +94,10 @@ pipeline {
docker build -t git.zontreck.com/ariascreations/yolks:jdk8 java/8
docker build -t git.zontreck.com/ariascreations/yolks:jdk11 java/11
docker build -t git.zontreck.com/ariascreations/yolks:jdk16 java/16
docker build -t git.zontreck.com/ariascreations/yolks:jdk17 java/17
docker build -t git.zontreck.com/ariascreations/yolks:jdk19 java/19
docker build -t git.zontreck.com/ariascreations/yolks:jdk21 java/21
'''
}
}
@ -111,6 +115,10 @@ pipeline {
docker push git.zontreck.com/ariascreations/yolks:jdk8
docker push git.zontreck.com/ariascreations/yolks:jdk11
docker push git.zontreck.com/ariascreations/yolks:jdk16
docker push git.zontreck.com/ariascreations/yolks:jdk17
docker push git.zontreck.com/ariascreations/yolks:jdk19
docker push git.zontreck.com/ariascreations/yolks:jdk21
'''
}
}

View file

@ -13,4 +13,8 @@ docker build -t git.zontreck.com/ariascreations/yolks:dart_3.3 dart/3.3
# Build java containers
docker build -t git.zontreck.com/ariascreations/yolks:jdk8 java/8
docker build -t git.zontreck.com/ariascreations/yolks:jdk11 java/11
docker build -t git.zontreck.com/ariascreations/yolks:jdk11 java/11
docker build -t git.zontreck.com/ariascreations/yolks:jdk16 java/16
docker build -t git.zontreck.com/ariascreations/yolks:jdk17 java/17
docker build -t git.zontreck.com/ariascreations/yolks:jdk19 java/19
docker build -t git.zontreck.com/ariascreations/yolks:jdk21 java/21

View file

@ -6,6 +6,7 @@ LABEL upstream="https://github.com/pelican-eggs/yolks"
LABEL type="OpenJDK 11"
USER root
RUN apt-get update
RUN apt-get install -y curl lsof ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 zip unzip
RUN useradd -m -d /home/container -s /bin/bash container

View file

@ -6,6 +6,7 @@ LABEL upstream="https://github.com/pelican-eggs/yolks"
LABEL type="OpenJDK 16"
USER root
RUN apt-get update
RUN apt-get install -y curl lsof ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 zip unzip
RUN useradd -m -d /home/container -s /bin/bash container

25
java/17/Dockerfile Normal file
View file

@ -0,0 +1,25 @@
FROM eclipse-temurin:17-jdk
LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com"
LABEL upstream="https://github.com/pelican-eggs/yolks"
LABEL type="OpenJDK 17"
USER root
RUN apt-get update
RUN apt-get install -y curl lsof ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 zip unzip
RUN useradd -m -d /home/container -s /bin/bash container
ENV USER=container HOME=/home/container
USER container
ENV USER=container HOME=/home/container
STOPSIGNAL SIGINT
USER container
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/bin/bash", "-c", "--"]
CMD ["/entrypoint.sh"]

26
java/17/entrypoint.sh Normal file
View file

@ -0,0 +1,26 @@
# 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
# Switch to the container's working directory
cd /home/container || exit 1
# Print Java version
printf "\033[1m\033[33mcontainer@ariaos~ \033[0mjava -version\n"
java -version
# 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')
# Display the command we're running in the output, and then execute it with eval
printf "\033[1m\033[33mcontainer@ariaos~ \033[0m"
echo "$PARSED"
# shellcheck disable=SC2086
eval "$PARSED"

25
java/19/Dockerfile Normal file
View file

@ -0,0 +1,25 @@
FROM eclipse-temurin:19-jdk
LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com"
LABEL upstream="https://github.com/pelican-eggs/yolks"
LABEL type="OpenJDK 19"
USER root
RUN apt-get update
RUN apt-get install -y curl lsof ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 zip unzip
RUN useradd -m -d /home/container -s /bin/bash container
ENV USER=container HOME=/home/container
USER container
ENV USER=container HOME=/home/container
STOPSIGNAL SIGINT
USER container
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/bin/bash", "-c", "--"]
CMD ["/entrypoint.sh"]

26
java/19/entrypoint.sh Normal file
View file

@ -0,0 +1,26 @@
# 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
# Switch to the container's working directory
cd /home/container || exit 1
# Print Java version
printf "\033[1m\033[33mcontainer@ariaos~ \033[0mjava -version\n"
java -version
# 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')
# Display the command we're running in the output, and then execute it with eval
printf "\033[1m\033[33mcontainer@ariaos~ \033[0m"
echo "$PARSED"
# shellcheck disable=SC2086
eval "$PARSED"

25
java/21/Dockerfile Normal file
View file

@ -0,0 +1,25 @@
FROM eclipse-temurin:21-jdk
LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com"
LABEL upstream="https://github.com/pelican-eggs/yolks"
LABEL type="OpenJDK 21"
USER root
RUN apt-get update
RUN apt-get install -y curl lsof ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 zip unzip
RUN useradd -m -d /home/container -s /bin/bash container
ENV USER=container HOME=/home/container
USER container
ENV USER=container HOME=/home/container
STOPSIGNAL SIGINT
USER container
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/bin/bash", "-c", "--"]
CMD ["/entrypoint.sh"]

26
java/21/entrypoint.sh Normal file
View file

@ -0,0 +1,26 @@
# 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
# Switch to the container's working directory
cd /home/container || exit 1
# Print Java version
printf "\033[1m\033[33mcontainer@ariaos~ \033[0mjava -version\n"
java -version
# 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')
# Display the command we're running in the output, and then execute it with eval
printf "\033[1m\033[33mcontainer@ariaos~ \033[0m"
echo "$PARSED"
# shellcheck disable=SC2086
eval "$PARSED"

View file

@ -6,6 +6,7 @@ LABEL upstream="https://github.com/pelican-eggs/yolks"
LABEL type="OpenJDK 8"
USER root
RUN apt-get update
RUN apt-get install -y curl lsof ca-certificates openssl git tar sqlite3 fontconfig tzdata iproute2 libfreetype6 zip unzip
RUN useradd -m -d /home/container -s /bin/bash container