Replace custom base image in model-loader 30/140530/1
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Thu, 20 Mar 2025 10:06:06 +0000 (11:06 +0100)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Thu, 20 Mar 2025 10:07:20 +0000 (11:07 +0100)
- 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 <Fiete.Ostkamp@telekom.de>
pom.xml
src/main/bin/start.sh [changed mode: 0644->0755]
src/main/docker/Dockerfile

diff --git a/pom.xml b/pom.xml
index 0cfc745..4348f31 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -73,8 +73,6 @@
                <aai.docker.version>1.0.0</aai.docker.version>
                <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/</aai.build.directory>
                <aai.docker.namespace>onap</aai.docker.namespace>
-               <aai.base.image>alpine</aai.base.image>
-               <aai.base.image.version>1.13.2</aai.base.image.version>
                <!-- This will be used for the docker images as the default format of maven build has issues -->
                <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
 
                                                <groupId>org.codehaus.groovy.maven</groupId>
                                                <artifactId>gmaven-plugin</artifactId>
                                                <version>1.0</version>
-                                               <executions>
-                                                       <execution>
-                                                               <phase>pre-clean</phase>
-                                                               <goals>
-                                                                       <goal>execute</goal>
-                                                               </goals>
-                                                               <configuration>
-                                                                       <source>
-                                                                               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'];
-                                                                       </source>
-                                                               </configuration>
-                                                       </execution>
-                                               </executions>
                                        </plugin>
                                        <plugin>
                                                <groupId>io.fabric8</groupId>
old mode 100644 (file)
new mode 100755 (executable)
index ea42d7f..75ade4e
@@ -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
index 10bc3e6..34e3866 100644 (file)
@@ -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"]