Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afa-farkhod/spring-boot-docker-api
Springboot java api which runs inside the docker container, and connection is checked with postman api
https://github.com/afa-farkhod/spring-boot-docker-api
docker java postman springboot
Last synced: about 1 month ago
JSON representation
Springboot java api which runs inside the docker container, and connection is checked with postman api
- Host: GitHub
- URL: https://github.com/afa-farkhod/spring-boot-docker-api
- Owner: afa-farkhod
- License: gpl-3.0
- Created: 2023-03-26T08:29:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T06:06:56.000Z (over 1 year ago)
- Last Synced: 2024-04-24T11:08:04.270Z (9 months ago)
- Topics: docker, java, postman, springboot
- Language: Java
- Homepage:
- Size: 17.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Spring-Boot-Docker-Api](https://spring.io/guides/topicals/spring-boot-docker/)
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`, With `Gradle`, 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"]
```
- 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