File size: 382 Bytes
c990683 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
FROM node:18
WORKDIR /app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the code
COPY . .
# Build the React app
RUN npm run build
# Install a simple server to serve the static files
RUN npm install -g serve
# Expose the port
EXPOSE 7860
# Start the server
CMD ["serve", "-s", "build", "-l", "7860"] |