Files
IOT_application/fuse-starter-v20.0.0/Dockerfile
2025-10-16 18:59:40 +05:30

21 lines
482 B
Docker

# Stage 1: Build Angular app
FROM node:18-alpine as build
WORKDIR /app
# Install build dependencies
RUN apk add --no-cache python3 make g++
COPY package*.json ./
RUN npm ci --legacy-peer-deps
COPY . .
# Increase Node memory and use faster build
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN npm run build -- --configuration production
# Stage 2: Serve via Nginx
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]