-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (20 loc) · 727 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (20 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Builds and serves the docs site (guide + API reference + in-browser
# playground). Build context must be the repo root (not docs/) because docs
# depends on helix via `file:../helix` - npm needs helix's source and its
# built dist/ present to link and compile against.
#
# docker build -t compiler-docs -f Dockerfile .
# docker run -d -p 8080:80 compiler-docs
FROM node:22-slim AS build
WORKDIR /repo
COPY helix/package*.json helix/
RUN npm --prefix helix ci
COPY helix helix
RUN npm --prefix helix run build
COPY docs/package*.json docs/
RUN npm --prefix docs ci
COPY docs docs
RUN npm --prefix docs run build
FROM nginx:alpine AS serve
COPY --from=build /repo/docs/.vitepress/dist /usr/share/nginx/html
EXPOSE 80