Skip to content

Commit

Permalink
fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
uche-madu committed Oct 17, 2023
1 parent f8fbdf6 commit e2d9c0b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ ARG AIRFLOW_VERSION

WORKDIR /usr/local/airflow

# Install dbt into a virtual environment
# The sed command allows pip to avoid running with --user flag in the virtual environment
RUN python -m venv dbt_venv && \
sed -i 's/include-system-site-packages = false/include-system-site-packages = true/' dbt_venv/pyvenv.cfg && \
. dbt_venv/bin/activate && \
pip install --no-cache-dir dbt-bigquery && \
deactivate
USER root

RUN mkdir /root/.dbt
COPY profiles.yml /root/.dbt
Expand All @@ -23,6 +17,15 @@ RUN mkdir -p dags/dbt/deb-capstone
COPY dbt/deb-capstone/dbt_project.yml dags/dbt/deb-capstone
COPY dbt/deb-capstone/ dags/dbt/deb-capstone

USER airflow
# Install dbt into a virtual environment
# The sed command allows pip to avoid running with --user flag in the virtual environment
RUN python -m venv dbt_venv && \
sed -i 's/include-system-site-packages = false/include-system-site-packages = true/' dbt_venv/pyvenv.cfg && \
. dbt_venv/bin/activate && \
pip install --no-cache-dir dbt-bigquery && \
deactivate

COPY requirements.txt .

RUN pip install --upgrade pip && \
Expand Down

0 comments on commit e2d9c0b

Please sign in to comment.