Minimal Java 21 + Spring Boot REST API — layered jar, non-root, actuator health. Multi-arch.
876
Minimal Java 21 + Spring Boot 3.3 REST API in a small, non-root, multi-arch image.
A clean starting point for a Spring Boot service: real @RestController endpoints, Actuator health checks, and a tuned multi-stage build — not a toy shell.
docker pull minhle202/spring-api
docker run --rm -p 8080:8080 minhle202/spring-api
curl http://localhost:8080/ # service info
curl "http://localhost:8080/api/hello?name=Minh" # greeting
curl http://localhost:8080/actuator/health # {"status":"UP"}
GET / — service info (name, version, endpoint map)GET /api/hello?name= — greeting; name defaults to WorldGET /actuator/health — Spring Boot Actuator health probestarter-web + actuator).eclipse-temurin:21-jre-alpine runtime.| Variable | Default | Description |
|---|---|---|
SERVER_PORT | 8080 | HTTP listen port (also EXPOSEd) |
JAVA_OPTS | empty | Extra JVM flags, e.g. -Xmx256m |
docker run --rm -p 9090:9090 -e SERVER_PORT=9090 \
-e JAVA_OPTS="-Xmx256m" minhle202/spring-api
latest, 1.0.0 — multi-arch (amd64 / arm64).Licensed under MIT © Lê Đức Minh. Source includes a README with build and extension notes.
Content type
Image
Digest
sha256:2e26c895b…
Size
89.9 MB
Last updated
4 months ago
docker pull minhle202/spring-api