FROM python:3.11-alpine

WORKDIR /app

RUN apk add --no-cache bash curl ca-certificates nodejs npm ripgrep

RUN pip install --no-cache-dir openai==1.109.1

RUN npm install -g @openai/codex@0.118.0

ENV PYTHONUNBUFFERED=1

RUN node --version && npm --version && codex --version

# Copy context messages into the container
COPY messages /app/messages
