# Use an official node runtime as a parent image FROM node:20 # Set the working directory to /client WORKDIR /client # Copy package.json and package-lock.json to /client COPY package*.json ./ # Install any needed packages specified in package.json RUN npm install # Copy the current directory contents into the container at /client COPY . . # Build the app RUN npm run build # Serve the app RUN npm install -g serve CMD ["serve", "-s", "public", "-l", "3000"]