24 lines
348 B
Docker
24 lines
348 B
Docker
# Use the official Node.js 20 image
|
|
FROM node:20
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy package.json and package-lock.json
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy the entire app
|
|
COPY . .
|
|
|
|
# Run Next.js build
|
|
RUN npm run build
|
|
|
|
# Expose the port the app runs on
|
|
EXPOSE 3000
|
|
|
|
# Start the app
|
|
CMD ["npm", "start"]
|