You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/04/22 21:18:27 UTC

[GitHub] [airflow] potiuk edited a comment on issue #15493: AIRFLOW_CONSTRAINTS_REFERENCE does not work properly while building the Docker image

potiuk edited a comment on issue #15493:
URL: https://github.com/apache/airflow/issues/15493#issuecomment-825191558


   Yeah. It looks like  cherry-picking bug. We have now different types of constraints and default value of the build-arg (AIRFLOW_CONSTRAINTS) was wrongly overridden to `constraints-2.0` (where it was supposed to be `constraints`)  while cherry-picking. This rename was needed in another place but not here.
   
   I will fix it shortly. In the meantime, you can simplify your build command a lot now.
   The build parameters were simplified for Docker build, and can be now found in: https://airflow.apache.org/docs/docker-stack/index.html (the old place contains link to the new documentation). You can find examples of builds as well as reference to all build-args.
   
   You'd normally (if not the cherry-picking bug) be able to run the  build command like this:
   
   ```
   docker build --pull --build-arg AIRFLOW_CONSTRAINTS_REFERENCE="constraints-2.0.2" \
   --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
   --build-arg AIRFLOW_VERSION="2.0.2" -t airflow:2.0.2 .
   ```
   
   However if you still want to use stable (until I merge the PR) branch you can workaround the problem by adding proper value of the `AIRFLOW_CONSTRAINTS` parameter like this:
   
   ```
   docker build --pull --build-arg AIRFLOW_CONSTRAINTS_REFERENCE="constraints-2.0.2" \
   --build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
   --build-arg AIRFLOW_VERSION="2.0.2" \
   --build-arg AIRFLOW_CONSTRAINTS="constraints" -t airflow:2.0.2 .
   ```
   


-- 
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:
users@infra.apache.org