Welcome to the Linux Foundation Forum!

Lab 5. Multi-stage Docker Build (Solution) - Not working on Windows

I'm referring to document "LFD254Labs09.23.2021.pdf", page 35, Lab 5. Multi-stage Docker Build (Solution)

It didn't work on my Windows laptop. The instructor have already earlier clarified the issue, and provided earlier a solution (spring-javaformat), somehow it was missed in this Dockerfile. It should look like below to work on both Mac & Windows

FROM schoolofdevops/maven:spring AS build
COPY . .
RUN mvn spring-javaformat:apply && \
    mvn package -DskipTests

FROM openjdk:8-alpine AS run
COPY --from=build /app/target/spring-petclinic-2.3.1.BUILD-SNAPSHOT.jar /run/petclinic.jar
CMD java -jar /run/petclinic.jar


  • gouravshah
    gouravshah Posts: 139

    This change is been added to the lab 5 now and will be pushed shortly. Thanks for bringing the fix mentioned in the video but not int the labs to our notice.

  • mstepien
    mstepien Posts: 389

    This has been updated. Thank you.


Upcoming Training