Eco-Friendly_Use / Dockerfile
gonzmart's picture
alfa version
979db68
raw
history blame
528 Bytes
# 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"]