-
Notifications
You must be signed in to change notification settings - Fork 6
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 #23 from vpa1977/petclinic-demo
Add spring petclinic demo
- Loading branch information
Showing
2 changed files
with
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
ARG PETCLINIC_REPO | ||
ARG PETCLINIC_TAG | ||
|
||
ARG BASE_IMAGE=ubuntu/chiselled-jre:8_edge | ||
ARG USER=app | ||
ARG UID=101 | ||
ARG GROUP=app | ||
ARG GID=101 | ||
|
||
FROM eclipse-temurin:8u362-b09-jdk-jammy as builder | ||
|
||
ENV PETCLINIC_TAG=${PETCLINIC_TAG:-spring-boot-2.7.3} | ||
ENV PETCLINIC_REPO=${PETCLINIC_REPO:-https://github.com/vpa1977/spring-petclinic} | ||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y git | ||
|
||
RUN git clone --branch $PETCLINIC_TAG $PETCLINIC_REPO | ||
|
||
RUN cd spring-petclinic && ./mvnw package | ||
|
||
FROM $BASE_IMAGE | ||
|
||
ARG USER | ||
ARG UID | ||
ARG GID | ||
USER $UID:$GID | ||
|
||
# copy petclinic sample | ||
COPY --chown=$UID:$GID --from=builder \ | ||
/spring-petclinic/target/spring-petclinic-2.7.3.jar / | ||
|
||
WORKDIR / | ||
|
||
ENTRYPOINT ["/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java", \ | ||
"-jar", \ | ||
"spring-petclinic-2.7.3.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,11 @@ | ||
# Spring PetClinic | ||
|
||
This Dockerfile runs the [Spring PetClinic](https://github.com/spring-projects/spring-petclinic) sample on the `ubuntu/chiselled-jre` container image. | ||
|
||
# Running the sample | ||
|
||
Execute: | ||
|
||
`` docker build -t petclinic . && docker run -p 8080:8080 --tmpfs /tmp:exec petclinic `` | ||
|
||
Give it a few minutes to build the sample application and then navigate to http://localhost:8080 to explore the demo. |