Skip to content

Commit

Permalink
#80 application.conf is no longer baked into the docker image, but lo…
Browse files Browse the repository at this point in the history
…aded from /opt/config/application.yaml (not part of the image, needs to be mounted when run, e.g. via `docker run -v`) (#88)
  • Loading branch information
dk1844 authored Jan 17, 2024
1 parent 44b66ed commit 474aed7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 \
Expand Down

0 comments on commit 474aed7

Please sign in to comment.