Fix docker images (#1919)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-10-30 17:18:08 +02:00
committed by GitHub
parent 3d77150c3a
commit f3d0daf5b4
2 changed files with 8 additions and 6 deletions

View File

@@ -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

View File

@@ -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 .