Browse code

move back Dockerfile, docker version packaged with Ubuntu LTS does not allow clone and docker build in subfolder

devnewton authored on 02/01/2016 at 12:24:28
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,26 @@
0
+FROM java:8
1
+
2
+# Update apt
3
+RUN apt-get update
4
+
5
+# Install mongodb
6
+RUN apt-get install -y mongodb-server
7
+RUN service mongodb start
8
+
9
+# Install maven
10
+RUN apt-get install -y maven
11
+
12
+WORKDIR /code
13
+
14
+# Prepare by downloading dependencies
15
+ADD ../pom.xml /code/pom.xml
16
+RUN ["mvn", "dependency:resolve"]
17
+RUN ["mvn", "verify"]
18
+
19
+# Adding source, compile and package into a fat jar
20
+ADD ../src /code/src
21
+RUN ["mvn", "package"]
22
+
23
+EXPOSE 27017
24
+EXPOSE 8080
25
+ENTRYPOINT service mongodb start && java -jar target/passgrid-1.0-SNAPSHOT.jar
0 26
\ No newline at end of file
1 27
deleted file mode 100644
... ...
@@ -1,26 +0,0 @@
1
-FROM java:8
2
-
3
-# Update apt
4
-RUN apt-get update
5
-
6
-# Install mongodb
7
-RUN apt-get install -y mongodb-server
8
-RUN service mongodb start
9
-
10
-# Install maven
11
-RUN apt-get install -y maven
12
-
13
-WORKDIR /code
14
-
15
-# Prepare by downloading dependencies
16
-ADD ../pom.xml /code/pom.xml
17
-RUN ["mvn", "dependency:resolve"]
18
-RUN ["mvn", "verify"]
19
-
20
-# Adding source, compile and package into a fat jar
21
-ADD ../src /code/src
22
-RUN ["mvn", "package"]
23
-
24
-EXPOSE 27017
25
-EXPOSE 8080
26
-ENTRYPOINT service mongodb start && java -jar target/passgrid-1.0-SNAPSHOT.jar
27 1
\ No newline at end of file