Spaces:
Build error
Build error
File size: 702 Bytes
193757d 026ef2f 193757d 026ef2f 193757d 1dcbb5c 193757d 026ef2f 193757d 026ef2f 193757d 026ef2f 193757d 026ef2f 193757d |
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 |
# Use the official Node.js image as the base
FROM node:18
# Set the working directory inside the container
WORKDIR /app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
# Install the dependencies
RUN npm ci
# Copy the entire project to the working directory
COPY . .
# Build the React application
RUN npm run build
# Use the official Nginx image as the base for serving the built files
FROM nginx:stable-alpine
# Copy the built files from the previous stage to the Nginx HTML directory
COPY --from=0 /app/dist /usr/share/nginx/html
# Expose the default Nginx port
EXPOSE 7860
# Start Nginx when the container launches
CMD ["nginx", "-g", "daemon off;"]
|