42 lines
977 B
Docker
42 lines
977 B
Docker
FROM node:20-slim
|
|
|
|
# Install ripgrep (used by search_code tool) and git
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ripgrep \
|
|
git \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Install all deps including devDeps (tsc needs them).
|
|
# Override NODE_ENV so Coolify's build-time NODE_ENV=production doesn't skip devDeps.
|
|
COPY package*.json ./
|
|
RUN NODE_ENV=development npm ci
|
|
|
|
# Copy source and compile
|
|
COPY tsconfig.json ./
|
|
COPY src/ ./src/
|
|
RUN npm run build
|
|
|
|
# Prune dev deps after build
|
|
RUN npm prune --omit=dev
|
|
|
|
# Create workspace dir and non-root user
|
|
RUN useradd -r -m -s /bin/bash agent && \
|
|
mkdir -p /workspaces && \
|
|
chown -R agent:agent /workspaces /app
|
|
|
|
USER agent
|
|
|
|
# Git identity for commits made by agents
|
|
RUN git config --global user.email "agent@vibnai.com" && \
|
|
git config --global user.name "Vibn Agent Runner"
|
|
|
|
EXPOSE 3333
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3333
|
|
|
|
CMD ["node", "dist/server.js"]
|