# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node.js runtime as a parent image
FROM node:18-alpine AS builder
# Set the working directory in the container
WORKDIR /app
# Copy the package.json and package-lock.json files
COPY package*.json ./
# Install the dependencies
RUN npm install
# Copy the rest of the application code
COPY . .
# Build the TypeScript code
RUN npm run build
# Use a new, clean Node.js runtime for the final image
FROM node:18-alpine
# Set the working directory
WORKDIR /app
# Copy the compiled application and node_modules from the builder stage
COPY --from=builder /app/build ./build
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
# Specify the default command to run when starting the container
CMD ["npm", "start"]