FROM python:3.11-slim
RUN pip install --no-cache-dir dbt-bigquery==1.7.7
WORKDIR /app
COPY dbt /app/dbt
ENV DBT_PROFILES_DIR=/app/dbt/profiles
WORKDIR /app/dbt
CMD bash -lc "dbt deps || true && dbt build --select staging+ marts+ && dbt test"
