forked from wasmCloud/wasmcloud.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 929 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (22 loc) · 929 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
27
28
29
30
# Air-gapped wasmCloud docs image. Builds the docs site with external
# integrations disabled (OFFLINE_BUILD=1 — see docusaurus.config.ts) and
# serves it from nginx:alpine. Published to ghcr.io/wasmcloud/docs:X.Y.Z
# when a `docs-v*` tag is pushed; see .github/workflows/release-docs.yml.
#
# Build:
# docker build -t wasmcloud-docs:test .
# --- Stage 1: build the static site -------------------------------------------
FROM node:24-alpine AS build
WORKDIR /repo
# Copy dependency manifests first so the `npm ci` layer is reused across
# doc-content-only rebuilds. Any change to package*.json busts the cache.
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
ENV OFFLINE_BUILD=1
RUN npm run build
# --- Stage 2: serve via nginx -------------------------------------------------
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /repo/build /usr/share/nginx/html
EXPOSE 80