summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNandkishor Patke <nandkishor-laxman.patke@t-systems.com>2024-07-01 16:38:53 +0000
committerGerrit Code Review <gerrit@onap.org>2024-07-01 16:38:53 +0000
commitf9d7fa1ec4d6e4e7120bf22e9f798f9141daf4e3 (patch)
tree44065b253e3f3c1212e265f5eed9862d39846602
parent21ad9e20af66fef0d8b3112b1c08ba6d4026e4a8 (diff)
parent3b8be9abec3a83c5f8e83e494214a213871e4056 (diff)
Merge "Use eclipse-temurin:8-jre-alpine docker base image in aai-resources"
-rw-r--r--aai-resources/pom.xml2
-rw-r--r--aai-resources/src/main/docker/Dockerfile32
-rw-r--r--aai-resources/src/main/docker/docker-entrypoint.sh48
-rw-r--r--aai-resources/src/main/scripts/install/addManualData.sh6
-rw-r--r--pom.xml2
-rw-r--r--version.properties2
6 files changed, 14 insertions, 78 deletions
diff --git a/aai-resources/pom.xml b/aai-resources/pom.xml
index b17d12e..e0b3d42 100644
--- a/aai-resources/pom.xml
+++ b/aai-resources/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.onap.aai.resources</groupId>
<artifactId>resources</artifactId>
- <version>1.14.3-SNAPSHOT</version>
+ <version>1.14.4-SNAPSHOT</version>
</parent>
<properties>
<java.version>1.8</java.version>
diff --git a/aai-resources/src/main/docker/Dockerfile b/aai-resources/src/main/docker/Dockerfile
index 754c49a..5c943c8 100644
--- a/aai-resources/src/main/docker/Dockerfile
+++ b/aai-resources/src/main/docker/Dockerfile
@@ -1,32 +1,12 @@
-FROM @aai.docker.namespace@/aai-common-@aai.base.image@:@aai.base.image.version@
+FROM eclipse-temurin:8-jre-alpine
+USER nobody
-USER root
-RUN mkdir -p /opt/aaihome/aaiadmin /opt/aai/logroot/AAI-RES /opt/bulkprocess_load
-
-
-VOLUME /tmp
-VOLUME /opt/tools
-
-HEALTHCHECK --interval=40s --timeout=10s --retries=3 CMD nc -z -v localhost ${SERVER_PORT:-8447} || exit 1
-
-
-
-ENV AAI_BUILD_VERSION @aai.docker.version@
-# Expose the ports for outside linux to use
-# 8447 is the important one to be used
-EXPOSE 8447
+ENV SERVER_PORT=8447
+EXPOSE ${SERVER_PORT}
# Add the proper files into the docker image from your build
WORKDIR /opt/app/aai-resources
-RUN chown -R aaiadmin:aaiadmin \
- /opt/app/aai-resources \
- /etc/profile.d \
- /opt/aai/logroot/AAI-RES \
- /opt/bulkprocess_load
-
-COPY --chown=aaiadmin:aaiadmin /maven/aai-resources/ .
-
-USER aaiadmin
+COPY --chown=nobody:nobody /maven/aai-resources/ .
-ENTRYPOINT ["/bin/bash", "/opt/app/aai-resources/docker-entrypoint.sh"]
+ENTRYPOINT ["/bin/sh", "/opt/app/aai-resources/docker-entrypoint.sh"]
diff --git a/aai-resources/src/main/docker/docker-entrypoint.sh b/aai-resources/src/main/docker/docker-entrypoint.sh
index 97bcb76..b946d85 100644
--- a/aai-resources/src/main/docker/docker-entrypoint.sh
+++ b/aai-resources/src/main/docker/docker-entrypoint.sh
@@ -7,9 +7,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,49 +26,6 @@ export SERVER_PORT=${SERVER_PORT:-8447};
USER_ID=${LOCAL_USER_ID:-9001}
GROUP_ID=${LOCAL_GROUP_ID:-9001}
-find /opt/app/ -name "*.sh" -exec chmod +x {} +
-
-if [ -f ${APP_HOME}/aai.sh ]; then
-
- ln -s bin scripts
- ln -s /opt/aai/logroot/AAI-RES logs
-
- mv ${APP_HOME}/aai.sh /etc/profile.d/aai.sh
- chmod 755 /etc/profile.d/aai.sh
-
- scriptName=$1;
-
- if [ ! -z $scriptName ]; then
-
- if [ -f ${APP_HOME}/bin/${scriptName} ]; then
- shift 1;
- ${APP_HOME}/bin/${scriptName} "$@" || {
- echo "Failed to run the ${scriptName}";
- exit 1;
- }
- else
- echo "Unable to find the script ${scriptName} in ${APP_HOME}/bin";
- exit 1;
- fi;
-
- exit 0;
- fi;
-
- if [ ! -f ${APP_HOME}/scripts/updatePem.sh ]; then
- echo "Unable to find the updatePem script";
- exit 1;
- else
- ${APP_HOME}/scripts/updatePem.sh
- fi;
-
-fi;
-
-mkdir -p /opt/app/aai-resources/logs/gc
-
-if [ -f ${APP_HOME}/resources/aai-resources-swm-vars.sh ]; then
- source ${APP_HOME}/resources/aai-resources-swm-vars.sh;
-fi;
-
if [ ! -z "${HEAP_SIZE}" ]; then
MIN_HEAP_SIZE=${HEAP_SIZE};
MAX_HEAP_SIZE=${HEAP_SIZE};
@@ -118,7 +75,6 @@ JAVA_OPTS="${JAVA_OPTS} -DAAI_CHEF_ENV=${AAI_CHEF_ENV}";
JAVA_OPTS="${JAVA_OPTS} -DSCLD_ENV=${SCLD_ENV}";
JAVA_OPTS="${JAVA_OPTS} -DAFT_ENVIRONMENT=${AFT_ENVIRONMENT}";
JAVA_OPTS="${JAVA_OPTS} -DlrmName=com.att.ajsc.aai-resources";
-JAVA_OPTS="${JAVA_OPTS} -DAAI_BUILD_VERSION=${AAI_BUILD_VERSION}";
JAVA_OPTS="${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom";
JAVA_OPTS="${JAVA_OPTS} -Dlogback.configurationFile=./resources/logback.xml";
JAVA_OPTS="${JAVA_OPTS} -Dloader.path=$APP_HOME/resources";
diff --git a/aai-resources/src/main/scripts/install/addManualData.sh b/aai-resources/src/main/scripts/install/addManualData.sh
index 645f7c8..1003f75 100644
--- a/aai-resources/src/main/scripts/install/addManualData.sh
+++ b/aai-resources/src/main/scripts/install/addManualData.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
###
# ============LICENSE_START=======================================================
@@ -9,9 +9,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/pom.xml b/pom.xml
index 4ad35d5..b43cebf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
</parent>
<groupId>org.onap.aai.resources</groupId>
<artifactId>resources</artifactId>
- <version>1.14.3-SNAPSHOT</version>
+ <version>1.14.4-SNAPSHOT</version>
<name>aai-resources</name>
<packaging>pom</packaging>
<modules>
diff --git a/version.properties b/version.properties
index 466ec95..82f9610 100644
--- a/version.properties
+++ b/version.properties
@@ -5,7 +5,7 @@
major_version=1
minor_version=14
-patch_version=2
+patch_version=4
base_version=${major_version}.${minor_version}.${patch_version}