FROM oven/bun:1.3.10

RUN apt-get update \
  && apt-get install -y --no-install-recommends \
    bash \
    ca-certificates \
    curl \
    docker.io \
    git \
    jq \
    openssh-client \
  && rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY package.json bun.lock* turbo.json ./
COPY apps ./apps
COPY packages ./packages
COPY tools ./tools
COPY scripts ./scripts

RUN bun install --frozen-lockfile

CMD ["bun", "apps/agent-worker/src/index.ts"]
