mavor/build/Dockerfile
damage bb419be5f4
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
init maven subsystem in docker
2024-12-23 15:44:45 +01:00

20 lines
614 B
Docker

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
COPY target/mavor.war /usr/local/tomcat/webapps/ROOT.war
# create temporary directory, no need to be a volume
RUN mkdir /mavor
# 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"
# set required ENV
ENV MAVOR_MAVEN_EXECUTABLE="/usr/bin/mvn"
ENV MAVOR_TEMP_DIR="/mavor"