-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (18 loc) · 878 Bytes
/
Copy pathDockerfile
File metadata and controls
23 lines (18 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# WindStrap — containerized build toolchain
#
# Builds the project (Tailwind CSS -> dist/windstrap.css + docs/ -> docs pages)
# inside a container so you do NOT need Node.js or npm on your host machine.
#
# docker compose build # build the image (installs node_modules inside it)
# docker compose run --rm build # npm run build -> dist/windstrap.css
# docker compose run --rm docs # npm run docs -> docs/ pages
# docker compose up watch # watch mode (regenerates CSS on change)
FROM node:20-alpine
WORKDIR /app
# Install dependencies first — keeps the npm layer cached across rebuilds.
COPY package.json package-lock.json ./
RUN npm ci
# Copy the rest of the project (node_modules, dist and docs are excluded via .dockerignore).
COPY . .
# Default action when running the image without a command override.
CMD ["npm", "run", "build:all"]