mavor/build/Dockerfile

20 lines
614 B
Docker
Raw Normal View History

2024-12-23 13:25:47 +01:00
FROM tomcat:11
# install maven
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends maven && rm -rf /var/lib/apt/lists/*
# copy war
2024-12-23 15:03:00 +01:00
COPY target/mavor.war /usr/local/tomcat/webapps/ROOT.war
2024-12-23 13:25:47 +01:00
# create temporary directory, no need to be a volume
RUN mkdir /mavor
2024-12-23 15:44:45 +01:00
# this mvn command fails but is intended to fail
# it just initializes maven subsystem so the first
# download on the website is faster
RUN /usr/bin/mvn dependency:copy-dependencies || echo "maven init done. fail is intended"
2024-12-23 13:25:47 +01:00
# set required ENV
ENV MAVOR_MAVEN_EXECUTABLE="/usr/bin/mvn"
ENV MAVOR_TEMP_DIR="/mavor"