-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
26 lines (23 loc) · 906 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
#
# Build stage
#
FROM maven:3.6.0-jdk-11-slim AS build
LABEL maintainer="[email protected]"
COPY . /home/app/
RUN mvn -f /home/app/samples/virtualan-virtualization/pom.xml clean install
#
# GCS Mount stage
#
FROM golang:1.15.2-alpine as gcsfuse
RUN apk add --no-cache git
ENV GOPATH /go
RUN go get -u github.com/googlecloudplatform/gcsfuse
RUN apk add --no-cache ca-certificates fuse
#
# Package stage
#
FROM adoptopenjdk/openjdk11:alpine
COPY --from=build /home/app/samples/virtualan-virtualization/lib /openapi/virtualan/lib
COPY --from=build /home/app/samples/virtualan-virtualization/target/virtualan-virtualization.jar /openapi/virtualan/virtualan-virtualization.jar
COPY --from=gcsfuse /go/bin/gcsfuse /usr/local/bin
ENTRYPOINT ["java", "-cp", "/openapi/virtualan/virtualan-virtualization.jar", "-Dloader.main=io.virtualan.Virtualization", "org.springframework.boot.loader.PropertiesLauncher"]