From f3d0daf5b4e0e565288c69100da9a1cc562532a6 Mon Sep 17 00:00:00 2001 From: Avgustin Marinov Date: Wed, 30 Oct 2024 17:18:08 +0200 Subject: [PATCH] Fix docker images (#1919) Signed-off-by: Marinov Avgustin --- hawkbit-runtime/docker/docker_build/Dockerfile | 7 ++++--- hawkbit-runtime/docker/docker_build/Dockerfile-mysql | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hawkbit-runtime/docker/docker_build/Dockerfile b/hawkbit-runtime/docker/docker_build/Dockerfile index 168e4879f1..f6811d1802 100644 --- a/hawkbit-runtime/docker/docker_build/Dockerfile +++ b/hawkbit-runtime/docker/docker_build/Dockerfile @@ -15,14 +15,15 @@ COPY KEY . RUN set -x &&\ apk add --no-cache --virtual build-dependencies gnupg unzip libressl wget &&\ gpg --import KEY &&\ - mkdir -p ${BUILD_DIR} &&\ - cd ${BUILD_DIR} &&\ wget -O ${APP}.jar --no-verbose https://repo1.maven.org/maven2/org/eclipse/hawkbit/${APP}/${VERSION}/${APP}-${VERSION}.jar &&\ wget -O ${APP}.jar.asc --no-verbose https://repo1.maven.org/maven2/org/eclipse/hawkbit/${APP}/${VERSION}/${APP}-${VERSION}.jar.asc &&\ gpg --batch --verify ${APP}.jar.asc ${APP}.jar &&\ + rm /${APP}.jar.asc /KEY &&\ apk del build-dependencies &&\ + mkdir -p ${BUILD_DIR} &&\ + cd ${BUILD_DIR} &&\ java -Djarmode=tools -jar /${APP}.jar extract --layers --launcher --destination . &&\ - rm ${APP}.jar ${APP}.jar.asc /KEY + rm /${APP}.jar FROM eclipse-temurin:${JAVA_VERSION}-jre-alpine diff --git a/hawkbit-runtime/docker/docker_build/Dockerfile-mysql b/hawkbit-runtime/docker/docker_build/Dockerfile-mysql index 095d2d73da..59b627329e 100644 --- a/hawkbit-runtime/docker/docker_build/Dockerfile-mysql +++ b/hawkbit-runtime/docker/docker_build/Dockerfile-mysql @@ -15,13 +15,14 @@ COPY KEY . RUN set -x &&\ apk add --no-cache --virtual build-dependencies gnupg unzip libressl wget &&\ gpg --import KEY &&\ - mkdir -p ${BUILD_DIR} &&\ - cd ${BUILD_DIR} &&\ wget -O ${APP}.jar --no-verbose https://repo1.maven.org/maven2/org/eclipse/hawkbit/${APP}/${VERSION}/${APP}-${VERSION}.jar &&\ wget -O ${APP}.jar.asc --no-verbose https://repo1.maven.org/maven2/org/eclipse/hawkbit/${APP}/${VERSION}/${APP}-${VERSION}.jar.asc &&\ gpg --batch --verify ${APP}.jar.asc ${APP}.jar &&\ + rm /${APP}.jar.asc /KEY &&\ + mkdir -p ${BUILD_DIR} &&\ + cd ${BUILD_DIR} &&\ java -Djarmode=tools -jar /${APP}.jar extract --layers --launcher --destination . &&\ - rm ${APP}.jar ${APP}.jar.asc /KEY + rm /${APP}.jar ARG MARIADB_DRIVER_VERSION=3.1.4 COPY KEY-mysql .