File tree Expand file tree Collapse file tree 2 files changed +28
-4
lines changed
src/main/resources/META-INF Expand file tree Collapse file tree 2 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 1+ # ### Stage 1: Build the application
2+ FROM openjdk:8-jdk-alpine as build
3+
4+ # Set the current working directory inside the image
5+ WORKDIR /app
6+
7+ # Copy the root pom.xml and the oauth2-resource-server context
8+ RUN mkdir oauth2-resource-server
9+ COPY ./oauth2-resource-server/ ./oauth2-resource-server
10+ COPY ./pom.xml .
11+
12+ # Change de directory inside the oauth2-resource-server folder
13+ WORKDIR /app/oauth2-resource-server
14+
15+ # Enable permissions on Maven executable
16+ RUN chmod u+x ./mvnw
17+
18+ # Package the application .jar
19+ RUN ./mvnw clean package liberty:package-server -Dinclude=runnable
20+
21+ # ### Stage 2: A minimal docker image with command to run the app
122FROM openjdk:8-jre-alpine
223
3- # Add my app and config
4- COPY target/oauth2-resource-server.jar ./
24+ # Set root workdir and copy the builded .jar from the previous stage
25+ WORKDIR /
26+ COPY --from=build /app/oauth2-resource-server/target/oauth2-resource-server.jar ./
527
28+ # Expose the 9280/tcp port
629EXPOSE 9280
730
8- CMD java -jar oauth2-resource-server.jar
31+ # Run the server when the docker starts
32+ CMD ["java" , "-jar" , "oauth2-resource-server.jar" ]
Original file line number Diff line number Diff line change 11mp.jwt.verify.publickey.location =/META-INF/public-key.pem
2- mp.jwt.verify.issuer =http://localhost :9080
2+ mp.jwt.verify.issuer =http://172.28.1.2 :9080
You can’t perform that action at this time.
0 commit comments