Skip to content

Commit

Permalink
Docker to build locally
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalLike committed Nov 11, 2024
1 parent 9533599 commit ca2b712
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Dockerfilelocal
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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 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"]

0 comments on commit ca2b712

Please sign in to comment.