mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
add Dockerfile
This commit is contained in:
parent
923e2b7aa3
commit
985da57f12
1 changed files with 22 additions and 0 deletions
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Copyright The OpenTelemetry Authors
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
# build: docker build -t petclinic .
|
||||||
|
# run: docker run -p 8080:8080 petclinic
|
||||||
|
|
||||||
|
FROM gradle:8-jdk17 AS builder
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app/
|
||||||
|
|
||||||
|
COPY ./ ./
|
||||||
|
RUN gradle bootJar
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
FROM gcr.io/distroless/java17-debian11
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app/
|
||||||
|
|
||||||
|
COPY --from=builder /usr/src/app/build/libs/spring-petclinic-*.jar ./spring-petclinic.jar
|
||||||
|
|
||||||
|
ENTRYPOINT [ "java", "-jar", "spring-petclinic.jar" ]
|
Loading…
Reference in a new issue