summaryrefslogtreecommitdiffstats
path: root/aai-resources/src/main/docker
diff options
context:
space:
mode:
Diffstat (limited to 'aai-resources/src/main/docker')
-rw-r--r--aai-resources/src/main/docker/Dockerfile32
-rw-r--r--aai-resources/src/main/docker/docker-entrypoint.sh48
2 files changed, 8 insertions, 72 deletions
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";