skip to Main Content

I get below error when tried to run the following breeze build command to build airflow docker. I clone the git airflow master branch to build this image.

Build Command:

./breeze build-image --production-image --python 3.7 --install-airflow-version 2.0.0 --additional-extras=jdbc --additional-python-deps="pandas" --additional-runtime-apt-deps="default-jre-headless"

Error:

    Step 83/94 : COPY scripts/docker/install*.sh /scripts/docker/
 ---> 8363694670bb
Step 84/94 : RUN if [[ ${INSTALL_FROM_PYPI} == "true" ]]; then         bash /scripts/docker/install_airflow.sh;     fi;     if [[ ${INSTALL_FROM_DOCKER_CONTEXT_FILES} == "true" ]]; then         bash /scripts/docker/install_from_docker_context_files.sh;     fi;     if [[ -n "${ADDITIONAL_PYTHON_DEPS}" ]]; then         bash /scripts/docker/install_additional_dependencies.sh;     fi;     find /root/.local/ -name '*.pyc' -print0 | xargs -0 rm -r || true ;     find /root/.local/ -type d -name '__pycache__' -print0 | xargs -0 rm -r || true
 ---> Running in 01f3dd4b7f57
+ [[ true == true ]]
+ bash /scripts/docker/install_airflow.sh

Installing all packages with constraints and upgrade if needed

ERROR: Invalid requirement: 'apache-airflow[async,amazon,celery,cncf.kubernetes,docker,dask,elasticsearch,ftp,grpc,hashicorp,http,ldap,google,microsoft.azure,mysql,postgres,redis,sendgrid,sftp,slack,ssh,statsd,virtualenv,jdbc]2.0.0'
WARNING: You are using pip version 20.2.4; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
The command '/bin/bash -o pipefail -e -u -x -c if [[ ${INSTALL_FROM_PYPI} == "true" ]]; then         bash /scripts/docker/install_airflow.sh;     fi;     if [[ ${INSTALL_FROM_DOCKER_CONTEXT_FILES} == "true" ]]; then         bash /scripts/docker/install_from_docker_context_files.sh;     fi;     if [[ -n "${ADDITIONAL_PYTHON_DEPS}" ]]; then         bash /scripts/docker/install_additional_dependencies.sh;     fi;     find /root/.local/ -name '*.pyc' -print0 | xargs -0 rm -r || true ;     find /root/.local/ -type d -name '__pycache__' -print0 | xargs -0 rm -r || true' returned a non-zero code: 1

ERROR: The previous step completed with error. Please take a look at output above

Edit (1):

I tried the same thing on an aws ec2 instance and get the same error. Something looks like is broken on the airflow side. Below is the screenshot.

enter image description here

2

Answers


  1. Replace

    --install-airflow-version 2.0.0
    

    with

    --install-airflow-version="2.0.0"
    

    So the command is:

    ./breeze build-image --production-image --python 3.7 --install-airflow-version "2.0.0" --additional-extras=jdbc --additional-python-deps="pandas" --additional-runtime-apt-deps="default-jre-headless"
    
    Login or Signup to reply.
  2. This worked for me:

    ./breeze build-image --production-image --python 3.7 --install-airflow-version "==2.0.0" --additional-extras=jdbc --additional-python-deps="pandas" --additional-runtime-apt-deps="default-jre-headless"
    

    had to add the "==".

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search