# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use a Node.js image with the appropriate version
FROM node:16-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package.json and package-lock.json for dependency installation
COPY package.json package.json
# Install dependencies
RUN npm install --ignore-scripts
# Copy the rest of the application source code
COPY . .
# Build the TypeScript project
RUN npm run build
# Prepare the runtime environment
FROM node:16-alpine AS release
# Set working directory
WORKDIR /app
# Copy built files and necessary configuration
COPY --from=builder /app/build /app/build
COPY --from=builder /app/package.json /app/package.json
# Set environment variables
ENV OPENCTI_URL=https://your-opencti-url
ENV OPENCTI_TOKEN=your-opencti-token
# Run the server
ENTRYPOINT ["node", "build/index.js"]