Welcome to the Linux Foundation Forum!

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

Hello,
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

  1. FROM schoolofdevops/maven:spring AS build
  2. WORKDIR /app
  3. COPY . .
  4. RUN mvn spring-javaformat:apply && \
  5. mvn package -DskipTests
  6.  
  7. FROM openjdk:8-alpine AS run
  8. COPY --from=build /app/target/spring-petclinic-2.3.1.BUILD-SNAPSHOT.jar /run/petclinic.jar
  9. EXPOSE 8080
  10. CMD java -jar /run/petclinic.jar

Comments

  • 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.

  • Posts: 492

    This has been updated. Thank you.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training