Files
IOT_application/fuse-starter-v20.0.0/Dockerfile
2025-10-16 19:19:27 +05:30

28 lines
562 B
Docker

# Stage 1: Build Angular application
FROM node:18-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies with legacy peer deps flag
RUN npm ci --legacy-peer-deps
# Copy source code
COPY . .
# Build for production
RUN npm run build -- --configuration production --progress=true
# Stage 2: Serve with Nginx
FROM nginx:alpine AS production
# Copy built artifacts from builder
COPY --from=builder /app/dist/fuse-angular /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Run nginx
CMD ["nginx", "-g", "daemon off;"]