diff --git a/Dockerfile b/Dockerfile index 1399ef3..7dc4824 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,14 @@ # will be added before anyone tries to build this image. FROM eclipse-temurin:21-jdk-alpine AS build +# Node + npm are required for the :web Gradle subproject's npm-based +# Vite build. The bootJar wires the SPA bundle into Spring Boot's +# classpath:/static/ via processResources, so a clean container build +# of `:distribution:bootJar` transitively runs `:web:npmInstall` and +# `:web:npmBuild` and needs npm on PATH. Apk's nodejs/npm packages +# track v22.x on Alpine 3.21, which Vite 5 + React 18 are happy with. +RUN apk add --no-cache nodejs npm + WORKDIR /workspace COPY . .