From e02ffaa21d8739dc5ecb9f35d1986dbb0227a0dc Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Sun, 19 Jul 2020 11:26:09 -0600 Subject: [PATCH] Initial Commit --- LICENSE.md | 21 +++++++++++++++++++++ README.md | 2 ++ alpine/Dockerfile | 21 +++++++++++++++++++++ alpine/entrypoint.sh | 20 ++++++++++++++++++++ java8/Dockerfile | 21 +++++++++++++++++++++ java8/entrypoint.sh | 23 +++++++++++++++++++++++ 6 files changed, 108 insertions(+) create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 alpine/Dockerfile create mode 100644 alpine/entrypoint.sh create mode 100644 java8/Dockerfile create mode 100644 java8/entrypoint.sh diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..7f8452d --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Matthew Penner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..bcaa33b --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Images +SoonTM diff --git a/alpine/Dockerfile b/alpine/Dockerfile new file mode 100644 index 0000000..544fdcd --- /dev/null +++ b/alpine/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 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 + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/alpine/entrypoint.sh b/alpine/entrypoint.sh new file mode 100644 index 0000000..b0841d8 --- /dev/null +++ b/alpine/entrypoint.sh @@ -0,0 +1,20 @@ +#!/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}'` + +# 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 new file mode 100644 index 0000000..cdd5cd1 --- /dev/null +++ b/java8/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 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 + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/ash", "/entrypoint.sh" ] diff --git a/java8/entrypoint.sh b/java8/entrypoint.sh new file mode 100644 index 0000000..ffd76d9 --- /dev/null +++ b/java8/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}