Skip to content

Commit eb51cf4

Browse files
committed
implement docker containerisation
1 parent 64aeb3a commit eb51cf4

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM eclipse-temurin:21-jre
2+
WORKDIR /app
3+
COPY target/task-manager-api-0.0.1-SNAPSHOT.jar app.jar
4+
ENTRYPOINT ["java", "-jar", "app.jar"]

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
55
![Java](https://img.shields.io/badge/Java-21-blue)
66
![Spring Boot](https://img.shields.io/badge/Spring%20Boot-4.1.0-green)
7+
![Docker](https://img.shields.io/badge/Docker-ready-blue?logo=docker)
78

89
A RESTful API for managing tasks built with Java 21 and Spring Boot.
910

@@ -21,6 +22,7 @@ A RESTful API for managing tasks built with Java 21 and Spring Boot.
2122
| Error Handling | @ControllerAdvice |
2223
| Eventing | Spring ApplicationEventPublisher |
2324
| Monitoring | Spring Actuator |
25+
| Containerisation | Docker |
2426
| Build Tool | Maven |
2527
| CI/CD | GitHub Actions |
2628

@@ -43,6 +45,13 @@ The API starts on `http://localhost:8080`. To build a JAR:
4345
java -jar target/task-manager-api-0.0.1-SNAPSHOT.jar
4446
```
4547

48+
**Or run with Docker:**
49+
50+
```bash
51+
docker build -t task-manager-api .
52+
docker run -p 8080:8080 task-manager-api
53+
```
54+
4655
---
4756

4857
## Profiles

0 commit comments

Comments
 (0)