-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (29 loc) · 914 Bytes
/
Dockerfile
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
FROM openjdk:8-jdk-alpine AS build
RUN apk add --update-cache \
npm git \
# clone and build UI
&& git clone https://github.com/adrian-dobre/BlinkWebUI \
&& cd BlinkWebUI \
&& npm install \
&& npm run build \
&& cd .. \
# clone and build Backend
&& git clone https://github.com/adrian-dobre/BlinkWebService.git \
&& cd BlinkWebService \
&& ./gradlew build bootJar \
&& cd .. \
# package all in a release folder
&& mkdir blinkwebapp \
&& cd blinkwebapp \
&& mkdir dist \
&& cp /BlinkWebService/build/libs/*jar ./blink-web-ui.jar \
&& cp /BlinkWebUI/dist/* ./dist \
# clean up
&& apk del \
npm git \
&& rm -rf /BlinkWebUI/ \
&& rm -rf /BlinkWebService/ \
&& rm -rf /var/cache/apk/*
FROM openjdk:8-jre-alpine
COPY --from=build /blinkwebapp /blinkwebapp
CMD ["java", "-jar", "/blinkwebapp/blink-web-ui.jar", "--uiBuildPath=/blinkwebapp/dist/", "--server.port=80"]