summaryrefslogtreecommitdiffstats
path: root/aai-resources
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-07-01 17:22:13 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-07-01 17:23:06 +0200
commit3b8be9abec3a83c5f8e83e494214a213871e4056 (patch)
treeb3b23196d3d15124c50ab0fccf066da150c8b3c8 /aai-resources
parent96cfb9625aeb8e2b9303db7a49ef6979d605f5f3 (diff)
Use eclipse-temurin:8-jre-alpine docker base image in aai-resources
- replace aai-common base image with plain java 8 jre - remove custom folders and users to simplify setup Issue-ID: AAI-3912 Change-Id: I248202b74133e0a71ff80bce560f27e147baf016 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to '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
4 files changed, 12 insertions, 76 deletions
diff --git a/aai-resources/pom.xml b/aai-resources/pom.xml
index b385805..8191459 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.