We use cookies

We use cookies and similar technologies for analytics and marketing. You can allow these cookies or continue with only essential cookies.

By clicking "Accept", you agree to our use of cookies.
Learn more.

Dockerizing Hatchet Applications

This guide explains how to create Dockerfiles for Hatchet applications. There are examples for Python, TypeScript, Go, and Ruby applications here.

Entrypoint Configuration for Hatchet

Before creating your Dockerfile, understand that Hatchet workers require specific entry point configuration:

  1. The entry point must run code that runs the Hatchet worker. This can be done by calling the worker.start() method in your respective SDK.
  2. Proper environment variables must be set for Hatchet SDK
  3. The worker should be configured to handle your workflows using the worker.register method or by passing workflows into the worker constructor or factory.

Example Dockerfiles

FROM python:3.13-slim

ENV PYTHONUNBUFFERED=1 \
 POETRY_VERSION=1.4.2 \
 HATCHET_ENV=production

# Install system dependencies and Poetry
RUN apt-get update && \
 apt-get install -y curl && \
 curl -sSL https://install.python-poetry.org | python3 - && \
 ln -s /root/.local/bin/poetry /usr/local/bin/poetry && \
 apt-get clean && \
 rm -rf /var/lib/apt/lists/\*

WORKDIR /app

COPY pyproject.toml poetry.lock\* /app/

RUN poetry config virtualenvs.create false && \
 poetry install --no-interaction --no-ansi

COPY . /app

CMD ["poetry", "run", "python", "worker.py"]

If you're using a poetry script to run your worker, you can replace poetry run python worker.py with poetry run <script-name> in the CMD.

Last updated on August 13, 2026

On this page