personal-site/Dockerfile

20 lines
330 B
Docker
Raw Normal View History

2023-10-24 17:59:00 +00:00
# Set Node.js version
FROM node:16
# Set working directory
WORKDIR /usr/src/app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY . .
# Expose port 3000
EXPOSE 3000
# Run the app
2023-08-21 08:14:02 +00:00
CMD ["npm", "run", "build", "&&", "npm", "start"]