potiuk commented on a change in pull request #4937: [AIRFLOW-4116]
Multi-staging includes CI image [Step 2/3]
URL: https://github.com/apache/airflow/pull/4937#discussion_r289836665
##########
File path: Dockerfile
##########
@@ -125,16 +239,19 @@ RUN echo "Pip version: ${PIP_VERSION}"
RUN pip install --upgrade pip==${PIP_VERSION}
+# We are copying everything with airflow:airflow user:group even if we use
root to run the scripts
+# This is fine as root user will be able to use those dirs anyway.
+
# Airflow sources change frequently but dependency configuration won't change
that often
# We copy setup.py and other files needed to perform setup of dependencies
# This way cache here will only be invalidated if any of the
# version/setup configuration change but not when airflow sources change
-COPY --chown=airflow:airflow setup.py /opt/airflow/setup.py
-COPY --chown=airflow:airflow setup.cfg /opt/airflow/setup.cfg
+COPY --chown=airflow:airflow setup.py ${AIRFLOW_HOME}/setup.py
+COPY --chown=airflow:airflow setup.cfg ${AIRFLOW_HOME}/setup.cfg
-COPY --chown=airflow:airflow airflow/version.py /opt/airflow/airflow/version.py
-COPY --chown=airflow:airflow airflow/__init__.py
/opt/airflow/airflow/__init__.py
-COPY --chown=airflow:airflow airflow/bin/airflow
/opt/airflow/airflow/bin/airflow
+COPY --chown=airflow:airflow airflow/version.py
${AIRFLOW_HOME}/airflow/version.py
Review comment:
Yep.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services