react/Dockerfile
2025-07-04 13:35:32 +00:00

23 lines
475 B
Docker

# Use an official Node runtime as a parent image
FROM node:16
# Set the working directory to /app
WORKDIR /app
# Copy the package.json and package-lock.json to the working directory
COPY ./package*.json ./
# Install the dependencies
RUN npm install
# Copy the remaining application files to the working directory
COPY . .
# Build the application
RUN npm run build
# Expose port 3000 for the application
EXPOSE 3000
# Start the application
CMD [ "npm", "run", "start" ]