[ui] Fix docker build for UI container 32/1032/1
authorCristina Pauna <cristina.pauna@enea.com>
Fri, 21 Jun 2019 12:59:50 +0000 (15:59 +0300)
committerCristina Pauna <cristina.pauna@enea.com>
Fri, 21 Jun 2019 13:51:59 +0000 (16:51 +0300)
The build is failing because it expects the java code to be built
before copying the executable inside the ui container

JIRA: VAL-31

Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
Change-Id: I1f3d92bab9d1de8fbe93a2da0667c82aca44789f

docker/ui/Dockerfile
docker/ui/Makefile

index ee710a1..cec47f9 100644 (file)
@@ -14,5 +14,9 @@
 # limitations under the License.
 #
 
 # limitations under the License.
 #
 
+FROM maven:3.6.1-jdk-11 as build
+RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation/repo
+RUN cd /opt/akraino/validation/repo/ui && mvn clean install
+
 FROM tomcat:8.5.37
 FROM tomcat:8.5.37
-COPY ./AECBlueprintValidationUI.war /usr/local/tomcat/webapps
\ No newline at end of file
+COPY  --from=build /opt/akraino/validation/repo/ui/target/AECBlueprintValidationUI.war /usr/local/tomcat/webapps
index 5e2d074..db91c1e 100644 (file)
 # limitations under the License.                                             #
 ##############################################################################
 
 # limitations under the License.                                             #
 ##############################################################################
 
-.PHONY: prepare
-prepare:
-       ln -f ../../ui/target/AECBlueprintValidationUI.war AECBlueprintValidationUI.war
-
 .PHONY: all
 .PHONY: all
-all: prepare .push_image .push_manifest
+all: .push_image .push_manifest
 
 .PHONY: build
 
 .PHONY: build
-build: prepare .build
+build: .build
 
 
-include ../build.mk
\ No newline at end of file
+include ../build.mk