+13
-1
@@ -2,7 +2,8 @@
|
||||
# to ../resources/public/js (see ui/shadow-cljs.edn), i.e. /build/resources/public/js here.
|
||||
# trixie, not bookworm: its default-jre is Java 21, which shadow-cljs's Closure Compiler
|
||||
# requires (bookworm's is 17 -> UnsupportedClassVersionError).
|
||||
FROM node:22-trixie-slim AS ui
|
||||
# ui-base holds what the UI's release build and its tests share: the toolchain and the deps.
|
||||
FROM node:22-trixie-slim AS ui-base
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends default-jre-headless \
|
||||
@@ -14,9 +15,20 @@ RUN npm ci
|
||||
# Resolve the ClojureScript deps in their own layer so source edits don't re-download them.
|
||||
COPY ui/shadow-cljs.edn ./
|
||||
RUN npx shadow-cljs classpath > /dev/null
|
||||
|
||||
FROM ui-base AS ui
|
||||
COPY ui/src ./src
|
||||
RUN npx shadow-cljs release app
|
||||
|
||||
# The UI's tests, not part of the server image: `docker build --target ui-test`
|
||||
# (script/docker-ui-test, script/docker-ui-coverage). Running the container runs the tests;
|
||||
# `npm run coverage` (script/docker-ui-coverage) also writes the report to /build/target/coverage/ui.
|
||||
FROM ui-base AS ui-test
|
||||
COPY ui/.c8rc.json ./
|
||||
COPY ui/src ./src
|
||||
COPY ui/test ./test
|
||||
CMD ["npm", "test"]
|
||||
|
||||
# Stage 2: the server.
|
||||
# JDK 21+ is required by the MCP server (plumcp runs on virtual threads).
|
||||
FROM clojure:temurin-21-tools-deps
|
||||
|
||||
Reference in New Issue
Block a user