Use this file to discover all available pages before exploring further.
The Portkey AI Gateway provides official Docker images for easy deployment. Run a single container with Docker or orchestrate multiple services with Docker Compose.
The gateway uses a multi-stage build for optimal image size:
Dockerfile
# Use the official Node.js runtime as a parent imageFROM node:20-alpine AS build# Set the working directory in the containerWORKDIR /app# Copy package.json and package-lock.json to the working directoryCOPY package*.json ./COPY patches ./# Upgrade system packagesRUN apk upgrade --no-cache# Upgrade npm to version 10.9.2RUN npm install -g npm@10.9.2# Install app dependenciesRUN npm install# Copy the rest of the application codeCOPY . .# Build the application and clean upRUN npm run build \&& rm -rf node_modules \&& npm install --omit=dev# Use the official Node.js runtime as a parent imageFROM node:20-alpine# Upgrade system packagesRUN apk upgrade --no-cache# Upgrade npm to version 10.9.2RUN npm install -g npm@10.9.2# Set the working directory in the containerWORKDIR /app# Copy the build directory, node_modules, and package.json to the working directoryCOPY --from=build /app/build /app/buildCOPY --from=build /app/node_modules /app/node_modulesCOPY --from=build /app/package.json /app/package.jsonCOPY --from=build /app/patches /app/patches# Expose port 8787EXPOSE 8787ENTRYPOINT ["npm"]CMD ["run", "start:node"]