forked from spring-projects/spring-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from panga/docker
Add Dockerfile and Docker Maven plugin
- Loading branch information
Showing
5 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dockerfile.glibc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM openjdk:10-jre-slim | ||
|
||
ADD spring-petclinic-2.0.0.BUILD-SNAPSHOT.jar app.jar | ||
|
||
ARG JVM_OPTS | ||
ENV JVM_OPTS=${JVM_OPTS} | ||
|
||
CMD java ${JVM_OPTS} -jar app.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM openjdk:10 as builder | ||
|
||
RUN jlink \ | ||
--add-modules java.xml.bind,java.sql,java.naming,java.management,java.instrument,java.security.jgss \ | ||
--verbose \ | ||
--strip-debug \ | ||
--compress 2 \ | ||
--no-header-files \ | ||
--no-man-pages \ | ||
--output /opt/jre-minimal | ||
|
||
FROM panga/alpine:3.7-glibc2.25 | ||
|
||
COPY --from=builder /opt/jre-minimal /opt/jre-minimal | ||
|
||
ENV LANG=C.UTF-8 \ | ||
PATH=${PATH}:/opt/jre-minimal/bin | ||
|
||
ADD modules /opt/app/modules | ||
|
||
ARG JVM_OPTS | ||
ENV JVM_OPTS=${JVM_OPTS} | ||
|
||
CMD java ${JVM_OPTS} --upgrade-module-path /opt/app/modules --module spring.petclinic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM panga/openjdk10:jdk-alpine as builder | ||
|
||
RUN jlink \ | ||
--add-modules java.xml.bind,java.sql,java.naming,java.management,java.instrument,java.security.jgss \ | ||
--verbose \ | ||
--strip-debug \ | ||
--compress 2 \ | ||
--no-header-files \ | ||
--no-man-pages \ | ||
--output /opt/jre-minimal | ||
|
||
FROM alpine:3.7 | ||
|
||
COPY --from=builder /opt/jre-minimal /opt/jre-minimal | ||
|
||
ENV LANG=C.UTF-8 \ | ||
PATH=${PATH}:/opt/jre-minimal/bin | ||
|
||
ADD modules /opt/app/modules | ||
|
||
ARG JVM_OPTS | ||
ENV JVM_OPTS=${JVM_OPTS} | ||
|
||
CMD java ${JVM_OPTS} --upgrade-module-path /opt/app/modules --module spring.petclinic |