forked from frankframework/frankframework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
25 lines (20 loc) · 1007 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ARG TOMCAT_VERSION=8.5.83-jdk8
FROM tomcat:${TOMCAT_VERSION} AS iaf-as-tomcat
ARG TOMCAT_GROUPID=1000
ARG TOMCAT_USERID=1000
RUN set -eux && \
# Create default directory for configurations, properties and credential filesystem
mkdir -p /opt/frank/secrets && \
# Create tomcat user for stepping down from root
groupadd -g ${TOMCAT_GROUPID} tomcat && \
useradd -u ${TOMCAT_USERID} -g tomcat -s /usr/sbin/nologin tomcat && \
# Change permissions and ownership of files
chown -hR tomcat:tomcat ${CATALINA_HOME} && \
chown -hR tomcat:tomcat /opt/frank
# All previous actions are performed as root. Run following instructions and start container as tomcat.
USER tomcat
# Copy environment configuration
COPY --chown=tomcat src/scripts/catalinaAdditional.properties /tmp
RUN cat /tmp/catalinaAdditional.properties >> /usr/local/tomcat/conf/catalina.properties && rm -f /tmp/catalinaAdditional.properties
# Copy JDBC and JMS drivers
COPY --chown=tomcat target/dependencies/*.jar /usr/local/tomcat/lib/