Icepick is designed to easily be run in any container-based platform (Hatchet Cloud, Railway, Fly.io, Porter, Kubernetes, AWS ECS, GCP Cloud Run). This guide explains how to create Dockerfiles for Icepick applications.

Entrypoint Configuration for Icepick

Before creating your Dockerfile, understand that Icepick agents require specific entry point configuration:
  1. The entry point must run code that runs the Icepick agent. This can be done by calling the icepick.start() method in your respective SDK.
  2. Proper environment variables must be set for Icepick SDK. At a minimum, you will need to set the HATCHET_CLIENT_TOKEN environment variables.

Example Dockerfile

# Stage 1: Build
FROM node:22 AS builder

WORKDIR /app

COPY package\*.json ./

RUN npm install

COPY . .

RUN npm run build

# Stage 2: Production
FROM node:22-alpine

WORKDIR /app

COPY package\*.json ./

RUN npm install --omit=dev

COPY --from=builder /app/dist ./dist

ENV NODE_ENV=production

CMD ["node", "dist/main.js"]