forked from apache/ode
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile-workflow
66 lines (51 loc) · 2.57 KB
/
Dockerfile-workflow
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM localhost:5000/sathwik/apache-buildr:latest-jruby-jdk8 as builder
ENV JAVA_OPTS="-Xmx1024M -XX:MaxPermSize=512M"
ENV BUILDR_ARGS="-f Rakefile clean package test=no JAVADOC=off"
RUN apt-get update -qq && apt-get install -qqy \
unzip \
&& rm -rf /var/lib/apt/lists/*
COPY . /workspace
RUN jruby -S bundler install --gemfile=/workspace/Gemfile \
&& buildr $BUILDR_ARGS \
&& mkdir /build \
&& cp /workspace/axis2-war/target/ode-axis2-war-1.3.8-SNAPSHOT.war /build/ode.war \
&& unzip /build/ode.war -d /build/ode
FROM tomcat:8.5-jre8
LABEL maintainer "Johannes Wettinger <[email protected]>, Michael Wurster <[email protected]>, Michael Hahn <[email protected]>"
ARG DOCKERIZE_VERSION=v0.6.1
ENV TOMCAT_USERNAME admin
ENV TOMCAT_PASSWORD admin
ENV ENGINE_PLAN_PORT 9763
ENV LOG_LEVEL info
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
COPY --from=builder /build/ode ${CATALINA_HOME}/webapps/ode
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
ADD axis2.xml.tpl ${CATALINA_HOME}/webapps/ode/WEB-INF/conf/axis2.xml.tpl
ADD log4j2.xml.tpl ${CATALINA_HOME}/webapps/ode/WEB-INF/classes/log4j2.xml.tpl
RUN mkdir ${CATALINA_HOME}/webapps/manager
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 \
-template ${CATALINA_HOME}/webapps/ode/WEB-INF/classes/log4j2.xml.tpl:${CATALINA_HOME}/webapps/ode/WEB-INF/classes/log4j2.xml \
${CATALINA_HOME}/bin/catalina.sh run
#
# Manually build by running:
#
# docker build -t opentosca/ode:local .
#
# Run ODE container:
#
# docker run -d -p 9763:9763 --name ode opentosca/ode:local
#
# Set a logging level different than "warn", e.g., for debugging process executions.
# Possible values are: all, trace, debug, info, warn, error, fatal, off.
# Visit Apache Log4j2 website for more details: https://logging.apache.org/log4j/2.x/.
#
# docker run -d -p 9763:9763 -e "LOG_LEVEL=debug" --name ode opentosca/ode:local
#