+# 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
ENV OTF_MONGO_USERNAME=username\r
ENV OTF_MONGO_PASSWORD=password\r
ENV OTF_MONGO_HOSTS=localhost:27017\r
-ENV OTF_MONGO_REPLICASET=mongoOTF\r
+ENV OTF_MONGO_REPLICASET=rs0\r
ENV OTF_MONGO_DATABASE=otf\r
-ENV OTF_CAMUNDA_DB_URL=localhost:3306/otf-camunda\r
-ENV OTF_CAMUNDA_DB_USERNAME=username\r
+ENV OTF_CAMUNDA_DB_URL=localhost:3306/camunda\r
+ENV OTF_CAMUNDA_DB_USERNAME=root\r
ENV OTF_CAMUNDA_DB_PASSWORD=password\r
ENV AAF_PERM_TYPE=type\r
ENV CADI_HOSTNAME=localhost\r
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