From 46c8ce6418a10e34380f9aac5426bfe2ca3b6923 Mon Sep 17 00:00:00 2001 From: Meno Abels Date: Tue, 19 Dec 2023 17:17:40 +0100 Subject: [PATCH] chore: small updates --- .github/workflows/config.yml | 5 ++++- Dockerfile | 16 +++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 4220646..f1f7893 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -26,6 +26,9 @@ jobs: run: | mvn package -no-transfer-progress + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build - Test Docker run: | - docker build . + docker buildx build . diff --git a/Dockerfile b/Dockerfile index 1341313..cd25023 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #FROM maven:3-jdk-8-alpine -FROM library/openjdk:8-alpine +FROM library/openjdk:23-slim as builder ENV LC_CTYPE en_US.UTF-8 WORKDIR /app @@ -8,14 +8,16 @@ COPY src /app/build/src #COPY alpn-boot-8.1.11.v20170118.jar /app/ #COPY $HOME/.m2/repository/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar /app -RUN apk update && \ - apk add maven && \ - apk add ttf-dejavu && \ - (cd /app/build && mvn package && cp target/imgsrc*.jar /app/imgsrc.jar) && \ - rm -rf /app/build $HOME/.m2 +RUN apt-get update -y && \ + apt-get install -y maven && \ + (cd /app/build && mvn package && cp target/imgsrc*.jar /app/imgsrc.jar) -#COPY cert.pem chain.pem fullchain.pem privkey.pem /app/ +FROM library/openjdk:23-slim +RUN apt-get update -y && \ + apt-get install -y fonts-dejavu + +COPY --from=builder /app/imgsrc.jar /app/imgsrc.jar #CMD ["java", "-Xbootclasspath/p:/app/alpn-boot-8.1.11.v20170118.jar", "-jar", "/app/imgsrc.jar", "-ssl", "https"] CMD ["java", "-jar", "/app/imgsrc.jar", "-ssl", "https"]