You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# First stage: **build environment**
FROM maven:3.5.0-jdk-8-alpine **AS builder**
# add pom.xml and source code
ADD ./pom.xml pom.xml
ADD ./src src/
# package jar
RUN mvn clean package
# Second **stage: minimal runtime environment**
From openjdk:8-jre-alpine
# copy jar from the first stage
COPY **--from=builder** target/my-app-1.0-SNAPSHOT.jar my-app-1.0-SNAPSHOT.jar
EXPOSE 8080
CMD ["java", "-jar", "my-app-1.0-SNAPSHOT.jar"]
So I want to create a first stage to build the project, then create a second stage to copy the artifact from the first stage and run it.
I tried to do this, but I was blocked in the second stage.
Hi, thank you for the fast response.
I want to reproduce some think like this .
So I want to create a first stage to build the project, then create a second stage to copy the artifact from the first stage and run it.
I tried to do this, but I was blocked in the second stage.
thank you .
Originally posted by @bramlihamza in #1708 (reply in thread)
The text was updated successfully, but these errors were encountered: