20 lines
435 B
Docker
20 lines
435 B
Docker
# Use an official Node.js runtime as a parent image
|
|
FROM node:18-alpine
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /app
|
|
|
|
# Copy package.json and package-lock.json to the container
|
|
COPY package.json package-lock.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy the rest of the application's code
|
|
COPY . .
|
|
|
|
# Expose the port the app runs on
|
|
EXPOSE 5173
|
|
|
|
# Command to run the development server
|
|
CMD ["npm", "run", "dev"] |