mvnw is a bash script; eclipse-temurin:21-jdk-alpine only provides ash (busybox), causing the container to exit silently with code 0 before the JVM starts. The Debian-based eclipse-temurin:21-jdk image includes bash. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 lines
222 B
Docker
10 lines
222 B
Docker
FROM eclipse-temurin:21-jdk
|
|
|
|
WORKDIR /app
|
|
|
|
EXPOSE 8080
|
|
|
|
# Source code and mvnw are mounted via docker-compose volume at runtime.
|
|
# Maven dependencies are cached in a named volume (~/.m2).
|
|
CMD ["./mvnw", "spring-boot:run"]
|