-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 995 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (22 loc) · 995 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
31
32
# MarkOS UI — Multi-stage Docker Build
#
# Stage 1: Build the frontend with Node.js
# Stage 2: Serve with Nginx (lightweight Alpine image)
# ── Build Stage ───────────────────────────────────────────────
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
# ── Production Stage ──────────────────────────────────────────
FROM nginx:1.27-alpine
# gettext provides envsubst for template rendering
# busybox wget is already included in Alpine for healthchecks
RUN apk add --no-cache gettext
COPY docker/nginx/default.conf.template /etc/nginx/templates/default.conf.template
COPY docker/entrypoint.sh /entrypoint.sh
COPY --from=build /app/dist /usr/share/nginx/html
RUN chmod +x /entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]