-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (26 loc) · 949 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION=3.10.12
FROM python:${PYTHON_VERSION} AS base
USER root
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PIP_ROOT_USER_ACTION="ignore"
ENV PATH="${PATH}:/root/.local/bin"
WORKDIR /opt/airflow
ARG POETRY_VERSION=1.6.1
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
set -e && \
apt-get update -qy && \
pip install -U pip && \
curl -sSL https://install.python-poetry.org | POETRY_VERSION=${POETRY_VERSION} python3 - && \
poetry config virtualenvs.create false
COPY pyproject.toml poetry.lock ./
RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=cache,target=/root/.cache/pypoetry \
poetry install --no-interaction --all-extras --sync --without dev,docs
COPY ./dags ./dags
COPY ./dbt ./dbt
WORKDIR /opt/airflow/dbt/superside
RUN poetry run dbt deps
WORKDIR /opt/airflow