Update Dockerfile
Browse files12345678910111213FROM node:14WORKDIR /appCOPY package*.json ./RUN npm ciCOPY . .RUN npm run buildEXPOSE 7860CMD ["npm", "start"]123456789101112131415161718192021222324252627282930313233343536# Use the official Node.js image as the baseFROM node:18# Set the working directory inside the containerWORKDIR /app# Copy package.json and package-lock.json to the working directoryCOPY package*.json ./# Install the dependenciesRUN npm ci# Copy the entire project to the working directoryCOPY . .RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \apt-get install -y nodejsCOPY package*.json ./COPY src ./srcRUN npm installRUN npm install reactflowRUN npm run build# Use the official Nginx image as the base for serving the built filesFROM nginx:stable-alpine# Copy the built files from the previous stage to the Nginx HTML directoryCOPY --from=0 /app/dist /usr/share/nginx/html# Expose the default Nginx portEXPOSE 7860# Start Nginx when the container launchesCMD ["nginx", "-g", "daemon off;"]
Dockerfile+25-2