# Task image: base + repo + installed dependencies + manifest. Built at publish time by
# `task-cli build`; candidates never wait for an install.
ARG BASE=inquro/workspace-base:dev
FROM ${BASE}

# The base image has no database clients; this task has a Postgres sidecar ("db"), so add psql.
RUN apt-get update && apt-get install -y --no-install-recommends postgresql-client && rm -rf /var/lib/apt/lists/*

COPY --chown=dev:dev repo/ /workspace/
USER dev
RUN cd /workspace && npm ci --no-audit --no-fund && npm cache clean --force
USER root

COPY task.json /etc/inquro/task.json
COPY review/ /etc/inquro/review/
