1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
FROM python:3.12
# Set separate working directory for easier debugging.
WORKDIR /app
ENV PYTHONPATH=/app;/app/src
# Install Git
RUN apt-get -y update && apt-get -y install git && apt-get clean
COPY requirements_dev.txt /requirements_dev.txt
#Install Dependencies
RUN --mount=type=cache,target=/root/.cache/pip pip install --upgrade pip setuptools wheel
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /requirements_dev.txt --upgrade --default-timeout=100
# Set up dbt-related dependencies.
RUN --mount=type=cache,target=/root/.cache/pip pip install dbt-postgres
# Copy everything. (Note: If needed, we can use .dockerignore to limit what's copied.)
COPY . .
# Install sqlfluff and the dbt templater in editable mode.
RUN pip install -e . -e plugins/sqlfluff-templater-dbt
|