-
Notifications
You must be signed in to change notification settings - Fork 352
/
Dockerfile
36 lines (26 loc) · 942 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
25
26
27
28
29
30
31
32
33
34
35
36
ARG TOMCAT_IMAGE
FROM $TOMCAT_IMAGE
ARG IDENTIFIER=unknown
LABEL identifier=${IDENTIFIER}
ENV WAIT_FOR_DB_CONTAINER=""
ENV DHIS2_HOME=/DHIS2_home
RUN rm -rf /usr/local/tomcat/webapps/* && \
mkdir /usr/local/tomcat/webapps/ROOT && \
mkdir $DHIS2_HOME && \
adduser --system --disabled-password --group tomcat && \
echo 'tomcat' >> /etc/cron.deny && \
echo 'tomcat' >> /etc/at.deny
RUN apt-get update && \
apt-get install --no-install-recommends -y \
util-linux \
bash \
unzip \
fontconfig
COPY ./shared/wait-for-it.sh /usr/local/bin/
COPY ./tomcat-debian/docker-entrypoint.sh /usr/local/bin/
RUN chmod +rx /usr/local/bin/docker-entrypoint.sh && \
chmod +rx /usr/local/bin/wait-for-it.sh
COPY ./shared/server.xml /usr/local/tomcat/conf
COPY ./artifacts/dhis.war /usr/local/tomcat/webapps/ROOT.war
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["catalina.sh", "run"]