From 5ea8fb48d48ded4206063b41e9aff63e51f82374 Mon Sep 17 00:00:00 2001 From: Enrico Risa Date: Mon, 27 Mar 2023 16:07:25 +0200 Subject: [PATCH] feat(baseImage): replace alpine with temurin as base image for running java application --- .github/workflows/build.yaml | 8 ++++---- .github/workflows/business-tests.yaml | 2 +- .github/workflows/draft-new-release.yaml | 2 +- .github/workflows/publish-new-release.yml | 4 ++-- .github/workflows/veracode.yaml | 6 +++--- .github/workflows/verify.yaml | 12 ++++++------ .../src/main/docker/Dockerfile | 7 +------ .../src/main/docker/Dockerfile | 7 +------ .../src/main/docker/Dockerfile | 7 +------ .../src/main/docker/Dockerfile | 7 +------ .../src/main/docker/Dockerfile | 7 +------ .../src/main/docker/Dockerfile | 7 +------ 12 files changed, 23 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 78b91b6f6..a3afa87e0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -77,7 +77,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' # Build - @@ -121,7 +121,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' # Build - @@ -188,7 +188,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' # Build - @@ -243,7 +243,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Import GPG Key uses: crazy-max/ghaction-import-gpg@v1 diff --git a/.github/workflows/business-tests.yaml b/.github/workflows/business-tests.yaml index f55d3d6ba..e2135cf07 100644 --- a/.github/workflows/business-tests.yaml +++ b/.github/workflows/business-tests.yaml @@ -56,7 +56,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Cache ContainerD Image Layers diff --git a/.github/workflows/draft-new-release.yaml b/.github/workflows/draft-new-release.yaml index 9c4e888c8..955284359 100644 --- a/.github/workflows/draft-new-release.yaml +++ b/.github/workflows/draft-new-release.yaml @@ -37,7 +37,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Bump version in gradle.properties diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml index d2064264f..88c5fe041 100644 --- a/.github/workflows/publish-new-release.yml +++ b/.github/workflows/publish-new-release.yml @@ -61,7 +61,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Import GPG Key @@ -181,7 +181,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Merge main back into develop and set new snapshot version diff --git a/.github/workflows/veracode.yaml b/.github/workflows/veracode.yaml index 722458663..0bfaac8b5 100644 --- a/.github/workflows/veracode.yaml +++ b/.github/workflows/veracode.yaml @@ -34,7 +34,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Verify proper formatting @@ -63,7 +63,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' # Build - @@ -112,7 +112,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' # Build - diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index adfeb5558..1ba38e785 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -69,7 +69,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Verify proper formatting @@ -91,7 +91,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Run Unit tests @@ -108,7 +108,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Run Integration tests @@ -125,7 +125,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Run API tests @@ -142,7 +142,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Run E2E tests @@ -165,7 +165,7 @@ jobs: uses: actions/setup-java@v3.10.0 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' cache: 'gradle' - name: Cache SonarCloud packages diff --git a/edc-controlplane/edc-controlplane-memory-hashicorp-vault/src/main/docker/Dockerfile b/edc-controlplane/edc-controlplane-memory-hashicorp-vault/src/main/docker/Dockerfile index c7c6d2c81..229c44868 100644 --- a/edc-controlplane/edc-controlplane-memory-hashicorp-vault/src/main/docker/Dockerfile +++ b/edc-controlplane/edc-controlplane-memory-hashicorp-vault/src/main/docker/Dockerfile @@ -26,17 +26,12 @@ HEALTHCHECK NONE RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.17.1 - +FROM eclipse-temurin:11.0.18_10-jre-alpine ARG JAR ARG APP_USER=docker ARG APP_UID=10100 -RUN apk update && \ - apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ - rm -rf /var/cache/apk/* - RUN addgroup --system "$APP_USER" RUN adduser \ diff --git a/edc-controlplane/edc-controlplane-memory/src/main/docker/Dockerfile b/edc-controlplane/edc-controlplane-memory/src/main/docker/Dockerfile index 3f9a9806b..b3e04fac7 100644 --- a/edc-controlplane/edc-controlplane-memory/src/main/docker/Dockerfile +++ b/edc-controlplane/edc-controlplane-memory/src/main/docker/Dockerfile @@ -26,17 +26,12 @@ HEALTHCHECK NONE RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.17.2 - +FROM eclipse-temurin:11.0.18_10-jre-alpine ARG JAR ARG APP_USER=docker ARG APP_UID=10100 -RUN apk update && \ - apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ - rm -rf /var/cache/apk/* - RUN addgroup --system "$APP_USER" RUN adduser \ diff --git a/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/src/main/docker/Dockerfile b/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/src/main/docker/Dockerfile index 3f9a9806b..b3e04fac7 100644 --- a/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/src/main/docker/Dockerfile +++ b/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/src/main/docker/Dockerfile @@ -26,17 +26,12 @@ HEALTHCHECK NONE RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.17.2 - +FROM eclipse-temurin:11.0.18_10-jre-alpine ARG JAR ARG APP_USER=docker ARG APP_UID=10100 -RUN apk update && \ - apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ - rm -rf /var/cache/apk/* - RUN addgroup --system "$APP_USER" RUN adduser \ diff --git a/edc-controlplane/edc-controlplane-postgresql/src/main/docker/Dockerfile b/edc-controlplane/edc-controlplane-postgresql/src/main/docker/Dockerfile index 3f9a9806b..b3e04fac7 100644 --- a/edc-controlplane/edc-controlplane-postgresql/src/main/docker/Dockerfile +++ b/edc-controlplane/edc-controlplane-postgresql/src/main/docker/Dockerfile @@ -26,17 +26,12 @@ HEALTHCHECK NONE RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.17.2 - +FROM eclipse-temurin:11.0.18_10-jre-alpine ARG JAR ARG APP_USER=docker ARG APP_UID=10100 -RUN apk update && \ - apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ - rm -rf /var/cache/apk/* - RUN addgroup --system "$APP_USER" RUN adduser \ diff --git a/edc-dataplane/edc-dataplane-azure-vault/src/main/docker/Dockerfile b/edc-dataplane/edc-dataplane-azure-vault/src/main/docker/Dockerfile index 605a6d03c..5c3b12f11 100644 --- a/edc-dataplane/edc-dataplane-azure-vault/src/main/docker/Dockerfile +++ b/edc-dataplane/edc-dataplane-azure-vault/src/main/docker/Dockerfile @@ -26,17 +26,12 @@ HEALTHCHECK NONE RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.17.2 - +FROM eclipse-temurin:11.0.18_10-jre-alpine ARG JAR ARG APP_USER=docker ARG APP_UID=10100 -RUN apk update && \ - apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ - rm -rf /var/cache/apk/* - RUN addgroup --system "$APP_USER" RUN adduser \ diff --git a/edc-dataplane/edc-dataplane-hashicorp-vault/src/main/docker/Dockerfile b/edc-dataplane/edc-dataplane-hashicorp-vault/src/main/docker/Dockerfile index 605a6d03c..5c3b12f11 100644 --- a/edc-dataplane/edc-dataplane-hashicorp-vault/src/main/docker/Dockerfile +++ b/edc-dataplane/edc-dataplane-hashicorp-vault/src/main/docker/Dockerfile @@ -26,17 +26,12 @@ HEALTHCHECK NONE RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar -FROM alpine:3.17.2 - +FROM eclipse-temurin:11.0.18_10-jre-alpine ARG JAR ARG APP_USER=docker ARG APP_UID=10100 -RUN apk update && \ - apk add openjdk11-jre-headless=11.0.18_p10-r0 --no-cache && \ - rm -rf /var/cache/apk/* - RUN addgroup --system "$APP_USER" RUN adduser \