From 474aed76c9e67516f4f69a779da225b90e1b9d32 Mon Sep 17 00:00:00 2001 From: Daniel K Date: Wed, 17 Jan 2024 09:10:29 +0100 Subject: [PATCH] #80 application.conf is no longer baked into the docker image, but loaded from /opt/config/application.yaml (not part of the image, needs to be mounted when run, e.g. via `docker run -v`) (#88) --- api/Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 0631f85..432df48 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -24,8 +24,7 @@ FROM $BASE_IMAGE as base # Provide your proxy if needed, e.g. http://my.proxy.examle.com:3128 ARG BUILD_PROXY -# Override of the example application config is possible -ARG CONFIG=./src/main/resources/example.application.yaml + # Provide path to the directory with LDAP certs in PEM format ARG LDAP_SSL_CERTS_PATH # ARG SSL_DNAME is defined below in the SSL-enabled image @@ -34,13 +33,12 @@ ARG LS_PREFIX=. LABEL org.opencontainers.image.authors="ABSA" -# Copy Spring application properties -COPY $CONFIG /opt/application.yaml - # deploy as root application in tomcat COPY ${LS_PREFIX}/target/scala-2.12/*.war /usr/local/tomcat/webapps/ROOT.war -ENV SPRING_CONFIG_LOCATION=/opt/application.yaml +# "/opt/config" dir needs to externally mounted (and must contain application.yaml) when run +# e.g. docker run -p 8080:8080 -p 8443:8443 -v "$(pwd)/src/main/resources:/opt/config" absaoss/login-service:latest +ENV SPRING_CONFIG_LOCATION=/opt/config/application.yaml ENV http_proxy=$BUILD_PROXY ENV https_proxy=$BUILD_PROXY @@ -49,7 +47,8 @@ ENV HTTPS_PROXY=$BUILD_PROXY RUN mkdir -p /opt/certs -COPY $LDAP_SSL_CERTS_PATH /opt/certs/ +# just PEMs are supported +COPY $LDAP_SSL_CERTS_PATH/*.pem /opt/certs/ RUN for file in `ls /opt/certs/*.pem`; \ do \