Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LeafdTK committed Oct 3, 2024
1 parent b7a2478 commit 1ee343e
Show file tree
Hide file tree
Showing 10 changed files with 361 additions and 0 deletions.
Binary file added .github.lnk
Binary file not shown.
65 changes: 65 additions & 0 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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/**

permissions:
actions: read
packages: write

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

jobs:
push:
name: "java_${{ matrix.tag }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag:
- 8
- 16
- 17
- 18
- 19
- 20
- 21
- 22
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@v6
with:
context: ./java
platforms: linux/amd64, linux/arm64
file: ./java/${{ matrix.tag }}/Dockerfile
push: true
tags: ghcr.io/LeafdTK/Images:java_${{ matrix.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
37 changes: 37 additions & 0 deletions Java/16/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM eclipse-temurin:16-jdk

LABEL author="Leafd" \
maintainer="[email protected]" \
org.opencontainers.image.source="https://github.com/LeafdTK/Images" \
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/*

RUN useradd -m -d /home/container container && \
locale-gen en_US.UTF-8

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

USER container
ENV USER=container \
HOME=/home/container
WORKDIR /home/container
37 changes: 37 additions & 0 deletions Java/17/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM eclipse-temurin:17-jdk

LABEL author="Leafd" \
maintainer="[email protected]" \
org.opencontainers.image.source="https://github.com/LeafdTK/Images" \
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/*

RUN useradd -m -d /home/container container && \
locale-gen en_US.UTF-8

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

USER container
ENV USER=container \
HOME=/home/container
WORKDIR /home/container
37 changes: 37 additions & 0 deletions Java/18/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM eclipse-temurin:18-jdk

LABEL author="Leafd" \
maintainer="[email protected]" \
org.opencontainers.image.source="https://github.com/LeafdTK/Images" \
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/*

RUN useradd -m -d /home/container container && \
locale-gen en_US.UTF-8

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

USER container
ENV USER=container \
HOME=/home/container
WORKDIR /home/container
37 changes: 37 additions & 0 deletions Java/19/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM eclipse-temurin:19-jdk

LABEL author="Leafd" \
maintainer="[email protected]" \
org.opencontainers.image.source="https://github.com/LeafdTK/Images" \
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/*

RUN useradd -m -d /home/container container && \
locale-gen en_US.UTF-8

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

USER container
ENV USER=container \
HOME=/home/container
WORKDIR /home/container
37 changes: 37 additions & 0 deletions Java/20/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM eclipse-temurin:20-jdk

LABEL author="Leafd" \
maintainer="[email protected]" \
org.opencontainers.image.source="https://github.com/LeafdTK/Images" \
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/*

RUN useradd -m -d /home/container container && \
locale-gen en_US.UTF-8

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

USER container
ENV USER=container \
HOME=/home/container
WORKDIR /home/container
37 changes: 37 additions & 0 deletions Java/21/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM eclipse-temurin:21-jdk

LABEL author="Leafd" \
maintainer="[email protected]" \
org.opencontainers.image.source="https://github.com/LeafdTK/Images" \
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/*

RUN useradd -m -d /home/container container && \
locale-gen en_US.UTF-8

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

USER container
ENV USER=container \
HOME=/home/container
WORKDIR /home/container
37 changes: 37 additions & 0 deletions Java/22/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM eclipse-temurin:22-jdk

LABEL author="Leafd" \
maintainer="[email protected]" \
org.opencontainers.image.source="https://github.com/LeafdTK/Images" \
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/*

RUN useradd -m -d /home/container container && \
locale-gen en_US.UTF-8

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

USER container
ENV USER=container \
HOME=/home/container
WORKDIR /home/container
37 changes: 37 additions & 0 deletions Java/8/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM eclipse-temurin:8-jdk

LABEL author="Leafd" \
maintainer="[email protected]" \
org.opencontainers.image.source="https://github.com/LeafdTK/Images" \
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/*

RUN useradd -m -d /home/container container && \
locale-gen en_US.UTF-8

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

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

0 comments on commit 1ee343e

Please sign in to comment.