diff --git a/tools/defradb.containerfile b/tools/defradb.containerfile index c2cbaeb80e..272a7e67ba 100644 --- a/tools/defradb.containerfile +++ b/tools/defradb.containerfile @@ -2,6 +2,13 @@ # An image to run defradb. +# Stage: PLAYGROUND_BUILD +FROM docker.io/node:20 AS PLAYGROUND_BUILD +WORKDIR /repo/ +COPY playground/ ./ +RUN npm install +RUN npm run build + # Stage: BUILD # Several steps are involved to enable caching and because of the behavior of COPY regarding directories. FROM docker.io/golang:1.20 AS BUILD @@ -9,6 +16,8 @@ WORKDIR /repo/ COPY go.mod go.sum Makefile ./ RUN make deps:modules COPY . . +COPY --from=PLAYGROUND_BUILD /repo/dist /repo/playground/dist/ +ENV BUILD_TAGS=playground RUN make build # Stage: RUN