Fix building process, use new repo, use JDK 21

This commit is contained in:
JeremyStar™ 2024-12-02 21:45:12 +01:00
parent 6302190494
commit 91be3ae517
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
3 changed files with 17 additions and 10 deletions

View file

@ -1,4 +1,7 @@
FROM archlinux:base-devel ####################
## Base container ##
####################
FROM archlinux:base-devel AS base
LABEL org.opencontainers.image.title="actions-docker" LABEL org.opencontainers.image.title="actions-docker"
LABEL org.opencontainers.image.description="StarOpenSource's Docker image for CI/CD pipelines." LABEL org.opencontainers.image.description="StarOpenSource's Docker image for CI/CD pipelines."
@ -23,3 +26,11 @@ RUN pacman -Syu --noconfirm
# Install packages required for actions to function properly # Install packages required for actions to function properly
RUN pacman -S --noconfirm nodejs git RUN pacman -S --noconfirm nodejs git
####################
## Java container ##
####################
FROM base AS java
# Install OpenJDK 21
RUN pacman -S --noconfirm jdk21-openjdk

View file

@ -1,4 +0,0 @@
FROM git.staropensource.de/staropensource/actions-docker:latest
# Install latest OpenJDK release
RUN pacman -S --noconfirm jdk-openjdk

View file

@ -7,12 +7,12 @@ help:
@echo " prune-cache Prunes the entire build cache" @echo " prune-cache Prunes the entire build cache"
build: build:
docker buildx rm actions-docker || true docker buildx rm actions-docker || true
docker buildx create --name actions-docker --bootstrap --use docker buildx create --bootstrap --name actions-docker --platform ${PLATFORMS}
docker buildx build --load --platform ${PLATFORMS} -t git.staropensource.de/staropensource/actions-docker:latest -f Dockerfile . docker buildx build --builder actions-docker --load --platform ${PLATFORMS} --target base -t git.staropensource.de/infrastructure/actions-docker:latest .
docker buildx build --load --platform ${PLATFORMS} -t git.staropensource.de/staropensource/actions-docker:java -f Dockerfile.java . docker buildx build --builder actions-docker --load --platform ${PLATFORMS} --target java -t git.staropensource.de/infrastructure/actions-docker:java .
docker buildx rm actions-docker docker buildx rm actions-docker
upload: build upload: build
docker push git.staropensource.de/staropensource/actions-docker:latest docker push git.staropensource.de/infrastructure/actions-docker:latest
docker push git.staropensource.de/staropensource/actions-docker:java docker push git.staropensource.de/infrastructure/actions-docker:java
prune-cache: prune-cache:
docker buildx prune -af docker buildx prune -af