https://github.com/edgar-code-repository/running-rest-demo-with-docker
Running a simple Rest API with Spring Boot and Docker
https://github.com/edgar-code-repository/running-rest-demo-with-docker
docker rest spring-boot
Last synced: about 2 months ago
JSON representation
Running a simple Rest API with Spring Boot and Docker
- Host: GitHub
- URL: https://github.com/edgar-code-repository/running-rest-demo-with-docker
- Owner: edgar-code-repository
- Created: 2023-04-02T22:20:46.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-04-09T01:34:49.000Z (about 3 years ago)
- Last Synced: 2025-01-23T04:29:33.302Z (over 1 year ago)
- Topics: docker, rest, spring-boot
- Language: Java
- Homepage:
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
REST DEMO WITH DOCKER
-----------------------------------------------------------------------------
Rest API that runs on port 5000 and contains just two simple endpoints:
http://localhost:5000/hello
http://localhost:5000/hello-to-you/{name}
-----------------------------------------------------------------------------
After packaging the Java application as a Jar file, the Docker image is built and run with these commands:
```
docker build -t running-rest-demo-with-docker:0.0.1 .
docker run -d -p 5000:5000 running-rest-demo-with-docker:0.0.1
```
-----------------------------------------------------------------------------