forked from geonetwork/core-geonetwork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·49 lines (35 loc) · 1.08 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
46
47
48
49
#
# Build stage
#
FROM maven:3.9.9-eclipse-temurin-11 AS build
COPY ./ /home/app
WORKDIR /home/app
RUN mvn install -DskipTests
#
# Package stage
#
FROM tomcat:8.5-jdk11
ENV GN_FILE geonetwork.war
ENV DATA_DIR=$CATALINA_HOME/webapps/geonetwork/WEB-INF/data
ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -server -Xms512m -Xmx2024m -XX:NewSize=512m -XX:MaxNewSize=1024m -XX:+UseConcMarkSweepGC"
ENV GN_DIR $CATALINA_HOME/webapps/geonetwork
#Environment variables
ENV GN_VERSION 4.4.5
WORKDIR $CATALINA_HOME/webapps
USER root
RUN apt-get -y update && \
apt-get -y install --no-install-recommends \
curl \
unzip
COPY --from=build /home/app/web/target/geonetwork.war geonetwork.war
RUN mkdir -p geonetwork && \
unzip -e $GN_FILE -d geonetwork && \
rm $GN_FILE
# To enable AJP and support for traefik headers
COPY ./georoma/server.xml $CATALINA_HOME/conf/server.xml
#Set geonetwork data dir
COPY ./georoma/docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 8009
ENTRYPOINT ["/entrypoint.sh"]
CMD ["catalina.sh", "run"]