Springboot java api which runs inside the docker container, and connection is checked with postman api
- A Basic Dockerfile
- A Spring Boot application is easy to convert into an executable JAR file. All the Getting Started Guides do this, and every application that you download from Spring Initializr has a build step to create an executable JAR. With
Maven
, you run./mvnw install
, WithGradle
, you run./gradlew build
. - A basic Dockerfile to run that JAR would then look like this, at the top level of your project:
FROM eclipse-temurin:17-jdk-alpine VOLUME /tmp ARG JAR_FILE COPY ${JAR_FILE} app.jar ENTRYPOINT ["java","-jar","/app.jar"]
- A Spring Boot application is easy to convert into an executable JAR file. All the Getting Started Guides do this, and every application that you download from Spring Initializr has a build step to create an executable JAR. With
- Springboot java api which shows the connection with the postman api through the port:8080(locally), port: 8000 (docker), i've already created the image of the java api:
- Then we start the docker image and direct it to another port:
- And now we can check it from postman client side:
- As we can see it is giving the previously created information from the docker container