Spaces:
Running
Running
File size: 528 Bytes
979db68 |
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 |
# Use an official Node runtime as a parent image
FROM node:16
# Set the working directory in the container
WORKDIR /app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application code
COPY . .
# Build the React app
RUN npm run build
# Install serve to serve the built app
RUN npm install -g serve
# Make port 7860 available to the world outside this container
EXPOSE 7860
# Run the app using serve
CMD ["serve", "-s", "build", "-l", "7860"] |