forked from apache/ode
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile-mvn
48 lines (35 loc) · 1.79 KB
/
Dockerfile-mvn
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
FROM trade4chor/maven:2.2.1-jdk6 as builder
RUN rm /dev/random && ln -s /dev/urandom /dev/random
WORKDIR /opt/opentosca/ode
COPY . /opt/opentosca/ode
RUN mvn clean install -DskipTests=true
FROM tomcat:8.5-jre8
LABEL maintainer "Johannes Wettinger <jowettinger@gmail.com>, Michael Wurster <miwurster@gmail.com>, Michael Hahn <mhahn.dev@gmail.com>"
ARG DOCKERIZE_VERSION=v0.3.0
ENV TOMCAT_USERNAME admin
ENV TOMCAT_PASSWORD admin
ENV ENGINE_PLAN_PORT 9763
RUN rm /dev/random && ln -s /dev/urandom /dev/random \
&& wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
RUN apt-get update -qq && apt-get install -qqy \
unzip \
&& rm -rf /var/lib/apt/lists/*
ADD tomcat-users.xml.tpl ${CATALINA_HOME}/conf/tomcat-users.xml.tpl
ADD manager.xml ${CATALINA_HOME}/conf/Catalina/localhost/manager.xml
ADD server.xml.tpl ${CATALINA_HOME}/conf/server.xml.tpl
COPY --from=builder /opt/opentosca/ode/axis2-war/target/ode-axis2-war-1.3.8.war ${CATALINA_HOME}/webapps/ode.war
RUN unzip ${CATALINA_HOME}/webapps/ode.war -d ${CATALINA_HOME}/webapps/ode
ADD axis2.xml.tpl ${CATALINA_HOME}/webapps/ode/WEB-INF/conf/axis2.xml.tpl
EXPOSE 9763
CMD dockerize -template ${CATALINA_HOME}/conf/tomcat-users.xml.tpl:${CATALINA_HOME}/conf/tomcat-users.xml \
-template ${CATALINA_HOME}/conf/server.xml.tpl:${CATALINA_HOME}/conf/server.xml \
-template ${CATALINA_HOME}/webapps/ode/WEB-INF/conf/axis2.xml.tpl:${CATALINA_HOME}/webapps/ode/WEB-INF/conf/axis2.xml \
${CATALINA_HOME}/bin/catalina.sh run
#
# Manually build by running:
#
# docker build -f Dockerfile-mvn -t opentosca/engine-plan-ode .
#
#