-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (28 loc) · 894 Bytes
/
Dockerfile
File metadata and controls
40 lines (28 loc) · 894 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
33
34
35
36
37
38
39
40
FROM node:22.19-slim AS build
ARG VITE_PROFILER_ENABLED=false
ARG VITE_LOG_LEVEL=info
WORKDIR /app
RUN adduser --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser
COPY package*.json ./
RUN npm ci
# Copy source code for build
COPY public/ ./public/
COPY src/ ./src/
COPY index.html ./
COPY *.json ./
RUN npm run build:nolint
# Create image for deployment
FROM nginxinc/nginx-unprivileged:1.29.5-alpine AS deployment
# Update package lists and upgrade libpng1.6
# to fix a security vulnerability (CVE-2026-22695)
USER root
RUN apk update && apk add --no-cache "libpng>=1.6.54"
# Update libcrypto3 to fix a security vulnerability (CVE-2025-15467)
RUN apk add --no-cache "libcrypto3>=3.5.5"
USER nginx
COPY nginx.conf /etc/nginx/nginx.conf
ARG DOCROOT=/usr/share/nginx/html
COPY --from=build /app/dist ${DOCROOT}
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]