From: Fiete Ostkamp Date: Thu, 20 Mar 2025 10:06:06 +0000 (+0100) Subject: Replace custom base image in model-loader X-Git-Tag: 1.14.3~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F140530%2F1;p=aai%2Fmodel-loader.git Replace custom base image in model-loader - use eclipse-temurin:11-jre-alpine base image instead of aai-common image Issue-ID: AAI-4148 Change-Id: Ia504910996e0c2cf945c83a5f2b1d2117a22ee86 Signed-off-by: Fiete Ostkamp --- diff --git a/pom.xml b/pom.xml index 0cfc745..4348f31 100644 --- a/pom.xml +++ b/pom.xml @@ -73,8 +73,6 @@ 1.0.0 ${project.build.directory}/${project.artifactId}-${project.version}-build/ onap - alpine - 1.13.2 yyyyMMdd'T'HHmmss'Z' @@ -136,28 +134,6 @@ org.codehaus.groovy.maven gmaven-plugin 1.0 - - - pre-clean - - execute - - - - def userAaiBaseImage = session.userProperties['aai.base.image']; - def userAaiCommonVersion = session.userProperties['aai.base.image.version']; - if (userAaiCommonVersion != null) { - project.properties['aai.base.image.version'] = userAaiCommonVersion; - } - if (userAaiBaseImage != null) { - project.properties['aai.base.image'] = userAaiBaseImage; - } - log.info 'Base image flavour: ' + project.properties['aai.base.image']; - log.info 'Base image version: ' + project.properties['aai.base.image.version']; - - - - io.fabric8 diff --git a/src/main/bin/start.sh b/src/main/bin/start.sh old mode 100644 new mode 100755 index ea42d7f..75ade4e --- a/src/main/bin/start.sh +++ b/src/main/bin/start.sh @@ -39,7 +39,7 @@ PROPS="$PROPS -Dcom.att.eelf.logging.path=$AJSC_HOME" PROPS="$PROPS -Dcom.att.eelf.logging.file=logback.xml" PROPS="$PROPS -Dlogback.configurationFile=$AJSC_HOME/logback.xml" PROPS="$PROPS -Dserver.port=9500" -JVM_MAX_HEAP=${MAX_HEAP:-1024} +JVM_ARGS="${JVM_ARGS} -XX:MaxRAMPercentage=${MAX_RAM_PERCENTAGE:-70}"; echo "java $java_runtime_arguments $PROPS -jar $JARFILE" java $java_runtime_arguments ${JVM_ARGS} $PROPS -jar $JARFILE diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index 10bc3e6..34e3866 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -1,18 +1,9 @@ -FROM @aai.docker.namespace@/aai-common-@aai.base.image@:@aai.base.image.version@ - -ARG MICRO_HOME=/opt/app/model-loader +FROM eclipse-temurin:11-jre-alpine +USER nobody +ENV MICRO_HOME=/opt/app/model-loader WORKDIR $MICRO_HOME -USER root - -RUN mkdir -p /opt/aaihome $MICRO_HOME /logs && \ - ln -s /logs $MICRO_HOME/logs && \ - chown -R aaiadmin:aaiadmin $MICRO_HOME && \ - chown -R aaiadmin:aaiadmin /logs - -COPY --chown=aaiadmin:aaiadmin /maven/model-loader/ . - -ENTRYPOINT ["/bin/bash", "/opt/app/model-loader/bin/start.sh"] +COPY --chown=nobody:nobody /maven/model-loader/ . -USER aaiadmin +ENTRYPOINT ["/bin/sh", "/opt/app/model-loader/bin/start.sh"]