added updated dockerfiles and ric workflow
[it/otf.git] / otf-camunda / docker / Dockerfile
index d63564e..1cecbe3 100644 (file)
@@ -1,3 +1,18 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #\r
+#                                                                              #\r
+#   Licensed under the Apache License, Version 2.0 (the "License");            #\r
+#   you may not use this file except in compliance with the License.           #\r
+#   You may obtain a copy of the License at                                    #\r
+#                                                                              #\r
+#       http://www.apache.org/licenses/LICENSE-2.0                             #\r
+#                                                                              #\r
+#   Unless required by applicable law or agreed to in writing, software        #\r
+#   distributed under the License is distributed on an "AS IS" BASIS,          #\r
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
+#   See the License for the specific language governing permissions and        #\r
+#   limitations under the License.                                             #\r
+################################################################################\r
+\r
 FROM openjdk:8\r
 \r
 ENV ENV=development\r
@@ -25,10 +40,16 @@ ENV PRIVATE_KEY=opt/cert/cert.key
 ENV PRIVATE_KEY_USERNAME=username\r
 ENV PRIVATE_KEY_PASSPHRASE=password\r
 \r
-COPY otf-camunda.jar app.jar\r
-\r
+RUN apt update\r
+RUN apt install maven -y\r
+COPY settings.xml settings.xml\r
+COPY src src\r
+COPY pom.xml pom.xml\r
+RUN mvn clean install -s settings.xml -DskipTests\r
+RUN rm /usr/share/maven/lib/*\r
+RUN ls\r
 RUN mkdir -p /otf/logs\r
+RUN mv target/otf-camunda.jar app.jar\r
+RUN rm -r target\r
 \r
-ADD src src\r
-\r
-ENTRYPOINT ["java", "-jar", "app.jar"]
\ No newline at end of file
+ENTRYPOINT ["java", "-jar", "app.jar"]\r