forked from geosolutions-it/MapStore2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (33 loc) · 1.37 KB
/
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
37
38
39
40
41
42
43
44
45
#FROM tomcat:9-jdk11-openjdk AS mother
#LABEL maintainer="Alessandro Parma<[email protected]>"
#ARG MAPSTORE_WEBAPP_SRC="https://github.com/geosolutions-it/MapStore2/releases/latest/download/mapstore.war"
#ADD "${MAPSTORE_WEBAPP_SRC}" "/mapstore/"
#COPY ./docker/* /mapstore/docker/
#WORKDIR /mapstore
FROM tomcat:9-jdk11-openjdk
# Tomcat specific options
ENV CATALINA_BASE "$CATALINA_HOME"
ENV MAPSTORE_WEBAPP_DST="${CATALINA_BASE}/webapps"
ENV INITIAL_MEMORY="512m"
ENV MAXIMUM_MEMORY="512m"
ENV JAVA_OPTS="${JAVA_OPTS} -Xms${INITIAL_MEMORY} -Xmx${MAXIMUM_MEMORY}"
ENV GEOSTORE_OVR_OPT="-Dgeostore-ovr=file://${CATALINA_BASE}/conf/geostore-ovr.properties"
ARG DATA_DIR="${CATALINA_BASE}/datadir"
ENV JAVA_OPTS="${JAVA_OPTS} ${GEOSTORE_OVR_OPT} -Ddatadir.location=${DATA_DIR}"
ENV TERM xterm
COPY ./release/bin-war/target/mapstore.war "${MAPSTORE_WEBAPP_DST}/mapstore.war"
COPY /docker "${CATALINA_BASE}/docker/"
RUN mkdir -p ${DATA_DIR}
RUN cp ${CATALINA_BASE}/docker/wait-for-postgres.sh /usr/bin/wait-for-postgres
RUN apt-get update \
&& apt-get install --yes postgresql-client \
&& apt-get clean \
&& apt-get autoclean \
&& apt-get autoremove -y \
&& rm -rf /var/cache/apt/* \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/share/man/* \
&& rm -rf /usr/share/doc/*
WORKDIR ${CATALINA_BASE}
VOLUME [ "${DATA_DIR}" ]
EXPOSE 8080