opentelemetry-java-instrume.../benchmark-overhead/Dockerfile.petclinic

21 lines
1.0 KiB
Docker

FROM eclipse-temurin:11.0.26_4-jdk@sha256:88ffb69a9a26d1b6c56897cb2e34aecf31d67f575d50620a00b54c543eae271e as app-build
# This is the base image that will contain a built version of the spring-petclinic-rest
# application. Installing the dependencies and maven compiling the application is time
# consuming, so we do it in a base image to save time nightly.
RUN apt update && apt install -y git
WORKDIR /app
RUN git clone http://github.com/spring-petclinic/spring-petclinic-rest.git
WORKDIR /app/spring-petclinic-rest
# We have to pin the version because upstream petclinic has breaking api changes after this commit
RUN git checkout 8aa4d49
RUN ./mvnw package -Dmaven.test.skip=true
RUN cp target/spring-petclinic-rest*.jar /app/spring-petclinic-rest.jar
FROM bellsoft/liberica-openjdk-alpine:21.0.6@sha256:fab34f9e4ff5676582c2ed7d23f9a3a63cf7da0b2f9b5285885b849a88862aaf
COPY --from=app-build /app/spring-petclinic-rest.jar /app/spring-petclinic-rest.jar
WORKDIR /app
EXPOSE 9966
CMD ["java", "-jar", "spring-petclinic-rest.jar"]