brigate/Dockerfile

21 lines
702 B
Docker
Raw Permalink Normal View History

2020-04-27 00:03:38 +02:00
FROM maven:latest AS builder
COPY . /src
WORKDIR /src
RUN mvn clean install
FROM tomcat:8.5
ARG PROJECT_NAME=centralino_brigate
2020-04-28 00:52:41 +02:00
ARG PROJECT_VERS=0.2.0
2020-04-27 00:03:38 +02:00
RUN cd /usr/local/tomcat/webapps.dist/ \
&& for FILE in *; do \
echo "Symlinking: $FILE -> /usr/local/tomcat/webapps/$FILE"; \
ln -s $PWD/$FILE /usr/local/tomcat/webapps/$FILE; \
done
COPY docker/tomcat-users.xml /usr/local/tomcat/conf/
COPY docker/host-manager/context.xml /usr/local/tomcat/webapps.dist/host-manager/META-INF/context.xml
COPY docker/manager/context.xml /usr/local/tomcat/webapps.dist/manager/META-INF/context.xml
COPY --from=builder /src/target/${PROJECT_NAME}-${PROJECT_VERS}.war /usr/local/tomcat/webapps/