-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
21 lines (20 loc) · 1.9 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM maven:3.5.4-jdk-8-alpine AS builder
COPY pom.xml settings.xml ./
COPY hello-api/pom.xml hello-api/
COPY hello-impl/pom.xml hello-impl/
RUN mkdir /root/.m2/ \
&& mv settings.xml /root/.m2/ \
&& mvn dependency:go-offline package \
&& rm /root/.m2/settings.xml
COPY hello-api hello-api/
COPY hello-impl hello-impl/
RUN mvn install -DskipTests --offline
FROM fabric8/java-alpine-openjdk8-jre
RUN apk add --no-cache nss
ENV AB_OFF=1 JAVA_MAIN_CLASS=play.core.server.ProdServerStart JAVA_APP_JAR=hello-impl-1.0-SNAPSHOT.jar
LABEL com.lightbend.rp.endpoints.1.protocol="tcp" com.lightbend.rp.endpoints.0.name="hello" com.lightbend.rp.app-version="1.0" com.lightbend.rp.app-name="hello-impl" com.lightbend.rp.config-resource="rp-application.conf" com.lightbend.rp.endpoints.0.ingress.0.paths.0="/api/hello/" com.lightbend.rp.endpoints.0.ingress.0.ingress-ports.0="80" com.lightbend.rp.app-type="lagom" com.lightbend.rp.endpoints.0.protocol="http" com.lightbend.rp.endpoints.0.ingress.0.ingress-ports.1="443" com.lightbend.rp.endpoints.1.name="akka-remote" com.lightbend.rp.reactive-maven-app-version="0.3.1-SNAPSHOT" com.lightbend.rp.modules.status.enabled="true" com.lightbend.rp.modules.common.enabled="true" com.lightbend.rp.modules.akka-management.enabled="true" com.lightbend.rp.modules.service-discovery.enabled="true" com.lightbend.rp.applications.0.name="default" com.lightbend.rp.applications.0.arguments.0="deployments/run-java.sh" com.lightbend.rp.modules.akka-cluster-bootstrap.enabled="true" com.lightbend.rp.modules.play-http-binding.enabled="true" com.lightbend.rp.endpoints.2.name="akka-mgmt-http" com.lightbend.rp.endpoints.2.protocol="tcp" com.lightbend.rp.endpoints.0.ingress.0.type="http"
COPY --from=builder hello-api ./
COPY --from=builder hello-impl ./
COPY --from=builder hello-impl/target/alternateLocation /deployments/
EXPOSE 9000
CMD ["java", "-cp", "/deployments/*", "play.core.server.ProdServerStart"]