From 92750f606516fed1a4da3023d187889920c9be09 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Tue, 4 Aug 2020 20:11:03 -0600 Subject: [PATCH] Add a bunch more java images, syntax changes --- .github/workflows/docker-publish.yml | 92 ++++++++++++++++++++++++++-- .gitignore | 1 + alpine/Dockerfile | 4 +- java10/Dockerfile | 21 +++++++ java10/entrypoint.sh | 23 +++++++ java11/Dockerfile | 21 +++++++ java11/entrypoint.sh | 23 +++++++ java12/Dockerfile | 21 +++++++ java12/entrypoint.sh | 23 +++++++ java13/Dockerfile | 21 +++++++ java13/entrypoint.sh | 23 +++++++ java14/Dockerfile | 21 +++++++ java14/entrypoint.sh | 23 +++++++ java7/Dockerfile | 21 +++++++ java7/entrypoint.sh | 23 +++++++ java8/Dockerfile | 4 +- java9/Dockerfile | 21 +++++++ java9/entrypoint.sh | 23 +++++++ 18 files changed, 401 insertions(+), 8 deletions(-) create mode 100644 .gitignore create mode 100644 java10/Dockerfile create mode 100644 java10/entrypoint.sh create mode 100644 java11/Dockerfile create mode 100644 java11/entrypoint.sh create mode 100644 java12/Dockerfile create mode 100644 java12/entrypoint.sh create mode 100644 java13/Dockerfile create mode 100644 java13/entrypoint.sh create mode 100644 java14/Dockerfile create mode 100644 java14/entrypoint.sh create mode 100644 java7/Dockerfile create mode 100644 java7/entrypoint.sh create mode 100644 java9/Dockerfile create mode 100644 java9/entrypoint.sh diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 338ddd5..f50bd63 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -21,13 +21,34 @@ jobs: - name: Registry Authentication run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin - - name: Build Alpine Image + - name: Build alpine Image run: docker build ./alpine --tag alpine - - name: Build Java8 Image + - name: Build java7 Image + run: docker build ./java7 --tag java7 + + - name: Build java8 Image run: docker build ./java8 --tag java8 - - name: Push Alpine Image + - name: Build java9 Image + run: docker build ./java9 --tag java9 + + - name: Build java10 Image + run: docker build ./java10 --tag java10 + + - name: Build java11 Image + run: docker build ./java11 --tag java11 + + - name: Build java12 Image + run: docker build ./java12 --tag java12 + + - name: Build java13 Image + run: docker build ./java13 --tag java13 + + - name: Build java14 Image + run: docker build ./java14 --tag java14 + + - name: Push alpine Image run: | IMAGE_NAME=alpine IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME @@ -36,7 +57,16 @@ jobs: docker tag $IMAGE_NAME $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION - - name: Push Java8 Image + - name: Push java7 Image + run: | + IMAGE_NAME=java7 + IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION + + - name: Push java8 Image run: | IMAGE_NAME=java8 IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME @@ -44,3 +74,57 @@ jobs: docker tag $IMAGE_NAME $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION + + - name: Push java9 Image + run: | + IMAGE_NAME=java9 + IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION + + - name: Push java10 Image + run: | + IMAGE_NAME=java10 + IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION + + - name: Push java11 Image + run: | + IMAGE_NAME=java11 + IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION + + - name: Push java12 Image + run: | + IMAGE_NAME=java12 + IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION + + - name: Push java13 Image + run: | + IMAGE_NAME=java13 + IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION + + - name: Push java14 Image + run: | + IMAGE_NAME=java14 + IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + + docker tag $IMAGE_NAME $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 544fdcd..d216771 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -10,8 +10,8 @@ FROM alpine:latest LABEL author="Matthew Penner" maintainer="me@matthewp.io" RUN apk add --update --no-cache ca-certificates tzdata \ - && adduser -D -h /home/container container \ - && ln -s /etc/localtime /etc/timezone + && adduser -D -h /home/container container \ + && ln -s /etc/localtime /etc/timezone USER container ENV USER=container HOME=/home/container diff --git a/java10/Dockerfile b/java10/Dockerfile new file mode 100644 index 0000000..249bdf2 --- /dev/null +++ b/java10/Dockerfile @@ -0,0 +1,21 @@ +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +FROM adoptopenjdk/openjdk10-openj9:alpine + +LABEL author="Matthew Penner" maintainer="me@matthewp.io" + +RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ + && adduser -D -h /home/container container \ + && ln -s /etc/localtime /etc/timezone + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java10/entrypoint.sh b/java10/entrypoint.sh new file mode 100644 index 0000000..ffd76d9 --- /dev/null +++ b/java10/entrypoint.sh @@ -0,0 +1,23 @@ +#!/bin/ash + +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +cd /home/container + +# Set environment variable that holds the Internal Docker IP +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +# Print Java version +java -version + +# Replace start command variables +MODIFIED_START=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo "[container@pterodactyl ~]$ ${MODIFIED_START}" + +# Run the modified start command +eval ${MODIFIED_START} diff --git a/java11/Dockerfile b/java11/Dockerfile new file mode 100644 index 0000000..f29f193 --- /dev/null +++ b/java11/Dockerfile @@ -0,0 +1,21 @@ +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +FROM adoptopenjdk/openjdk11-openj9:alpine + +LABEL author="Matthew Penner" maintainer="me@matthewp.io" + +RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ + && adduser -D -h /home/container container \ + && ln -s /etc/localtime /etc/timezone + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java11/entrypoint.sh b/java11/entrypoint.sh new file mode 100644 index 0000000..ffd76d9 --- /dev/null +++ b/java11/entrypoint.sh @@ -0,0 +1,23 @@ +#!/bin/ash + +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +cd /home/container + +# Set environment variable that holds the Internal Docker IP +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +# Print Java version +java -version + +# Replace start command variables +MODIFIED_START=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo "[container@pterodactyl ~]$ ${MODIFIED_START}" + +# Run the modified start command +eval ${MODIFIED_START} diff --git a/java12/Dockerfile b/java12/Dockerfile new file mode 100644 index 0000000..17ddad9 --- /dev/null +++ b/java12/Dockerfile @@ -0,0 +1,21 @@ +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +FROM adoptopenjdk/openjdk12-openj9:alpine + +LABEL author="Matthew Penner" maintainer="me@matthewp.io" + +RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ + && adduser -D -h /home/container container \ + && ln -s /etc/localtime /etc/timezone + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java12/entrypoint.sh b/java12/entrypoint.sh new file mode 100644 index 0000000..ffd76d9 --- /dev/null +++ b/java12/entrypoint.sh @@ -0,0 +1,23 @@ +#!/bin/ash + +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +cd /home/container + +# Set environment variable that holds the Internal Docker IP +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +# Print Java version +java -version + +# Replace start command variables +MODIFIED_START=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo "[container@pterodactyl ~]$ ${MODIFIED_START}" + +# Run the modified start command +eval ${MODIFIED_START} diff --git a/java13/Dockerfile b/java13/Dockerfile new file mode 100644 index 0000000..8c2fbaa --- /dev/null +++ b/java13/Dockerfile @@ -0,0 +1,21 @@ +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +FROM adoptopenjdk/openjdk13-openj9:alpine + +LABEL author="Matthew Penner" maintainer="me@matthewp.io" + +RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ + && adduser -D -h /home/container container \ + && ln -s /etc/localtime /etc/timezone + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java13/entrypoint.sh b/java13/entrypoint.sh new file mode 100644 index 0000000..ffd76d9 --- /dev/null +++ b/java13/entrypoint.sh @@ -0,0 +1,23 @@ +#!/bin/ash + +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +cd /home/container + +# Set environment variable that holds the Internal Docker IP +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +# Print Java version +java -version + +# Replace start command variables +MODIFIED_START=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo "[container@pterodactyl ~]$ ${MODIFIED_START}" + +# Run the modified start command +eval ${MODIFIED_START} diff --git a/java14/Dockerfile b/java14/Dockerfile new file mode 100644 index 0000000..816caac --- /dev/null +++ b/java14/Dockerfile @@ -0,0 +1,21 @@ +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +FROM adoptopenjdk/openjdk14-openj9:alpine + +LABEL author="Matthew Penner" maintainer="me@matthewp.io" + +RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ + && adduser -D -h /home/container container \ + && ln -s /etc/localtime /etc/timezone + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java14/entrypoint.sh b/java14/entrypoint.sh new file mode 100644 index 0000000..ffd76d9 --- /dev/null +++ b/java14/entrypoint.sh @@ -0,0 +1,23 @@ +#!/bin/ash + +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +cd /home/container + +# Set environment variable that holds the Internal Docker IP +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +# Print Java version +java -version + +# Replace start command variables +MODIFIED_START=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo "[container@pterodactyl ~]$ ${MODIFIED_START}" + +# Run the modified start command +eval ${MODIFIED_START} diff --git a/java7/Dockerfile b/java7/Dockerfile new file mode 100644 index 0000000..333729a --- /dev/null +++ b/java7/Dockerfile @@ -0,0 +1,21 @@ +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +FROM openjdk:7-jre-alpine + +LABEL author="Matthew Penner" maintainer="me@matthewp.io" + +RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ + && adduser -D -h /home/container container \ + && ln -s /etc/localtime /etc/timezone + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java7/entrypoint.sh b/java7/entrypoint.sh new file mode 100644 index 0000000..ffd76d9 --- /dev/null +++ b/java7/entrypoint.sh @@ -0,0 +1,23 @@ +#!/bin/ash + +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +cd /home/container + +# Set environment variable that holds the Internal Docker IP +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +# Print Java version +java -version + +# Replace start command variables +MODIFIED_START=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo "[container@pterodactyl ~]$ ${MODIFIED_START}" + +# Run the modified start command +eval ${MODIFIED_START} diff --git a/java8/Dockerfile b/java8/Dockerfile index cdd5cd1..7c8e5b1 100644 --- a/java8/Dockerfile +++ b/java8/Dockerfile @@ -10,8 +10,8 @@ FROM ibmjava:8-jre-alpine LABEL author="Matthew Penner" maintainer="me@matthewp.io" RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ - && adduser -D -h /home/container container \ - && ln -s /etc/localtime /etc/timezone + && adduser -D -h /home/container container \ + && ln -s /etc/localtime /etc/timezone USER container ENV USER=container HOME=/home/container diff --git a/java9/Dockerfile b/java9/Dockerfile new file mode 100644 index 0000000..78a656e --- /dev/null +++ b/java9/Dockerfile @@ -0,0 +1,21 @@ +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +FROM adoptopenjdk/openjdk9-openj9:alpine + +LABEL author="Matthew Penner" maintainer="me@matthewp.io" + +RUN apk add --update --no-cache curl ca-certificates openssl git tar bash sqlite fontconfig tzdata \ + && adduser -D -h /home/container container \ + && ln -s /etc/localtime /etc/timezone + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java9/entrypoint.sh b/java9/entrypoint.sh new file mode 100644 index 0000000..ffd76d9 --- /dev/null +++ b/java9/entrypoint.sh @@ -0,0 +1,23 @@ +#!/bin/ash + +# +# Copyright (c) 2020 Matthew Penner +# +# This repository is licensed under the MIT License. +# https://github.com/matthewpi/images/blob/master/LICENSE.md +# + +cd /home/container + +# Set environment variable that holds the Internal Docker IP +export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'` + +# Print Java version +java -version + +# Replace start command variables +MODIFIED_START=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')` +echo "[container@pterodactyl ~]$ ${MODIFIED_START}" + +# Run the modified start command +eval ${MODIFIED_START}