Files
Aegis/frontend/Dockerfile
kitos 498536f3f1
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
fix(security): remediate CVE-2026-42043 — upgrade axios ^1.14.0
- package.json: bump axios constraint from ^1.13.5 to ^1.14.0
- Dockerfile build stage: npm ci -> npm install so the semver range
  in package.json is honoured at build time (npm ci uses the lockfile
  exactly, bypassing the updated constraint)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 13:17:45 +02:00

46 lines
1.2 KiB
Docker

# ── Development Stage ──────────────────────────────────────────────────────
FROM node:20-alpine AS development
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY . .
# Expose Vite dev server port
EXPOSE 5173
# Start dev server with host binding for Docker
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
# ── Build Stage ────────────────────────────────────────────────────────────
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# ── Production Stage ───────────────────────────────────────────────────────
FROM nginx:alpine AS production
# Copy built files to nginx
COPY --from=build /app/dist /usr/share/nginx/html
# Copy nginx config for SPA routing
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]