mirror of https://github.com/knative/docs.git
23 lines
485 B
Docker
23 lines
485 B
Docker
# Use a base image with Node.js LTS
|
|
FROM node:lts-alpine
|
|
|
|
# Set the working directory inside the container
|
|
WORKDIR /app
|
|
|
|
# Copy package.json and package-lock.json to the working directory
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy the rest of your application code to the working directory
|
|
COPY . .
|
|
|
|
# Build the Next.js application
|
|
RUN npm run build
|
|
|
|
# Expose the port your app runs on
|
|
EXPOSE 3000
|
|
|
|
# Define the command to run your app
|
|
CMD ["npm", "run dev"] |