potiuk commented on issue #15648:
URL: https://github.com/apache/airflow/issues/15648#issuecomment-831847899


   Also I'd heartily recommend using the official airflow image instead of 
building your own. 
   
   It is heavily optimized for size (based on 'slim' version of debian buster, 
uses multi-staging approach where "build-essentials" are not included in the 
final image) also it supports mysql client installation and works 
out-of-the-box:
   
   `apache/airflow:2.0.1-python3.8`
   
   Also, if you want to customize it and use less number of extras than the 
default, you can customize the image as described in 
https://airflow.apache.org/docs/docker-stack/build.html#customizing-the-image 
including some examples.
   
   In your case what should work is get the latest version of airflow sources 
from master or `v-2-0-stable` branch and run::
   
   ``
   docker build . \
       --build-arg PYTHON_BASE_IMAGE="python:3.8-slim-buster" \
       --build-arg AIRFLOW_VERSION="2.0.1" \
       --build-arg AIRFLOW_EXTRAS="google,mysql,postgres,celery,redis,ssh,sftp" 
\
       --tag "your-image"
   ```
   
   Also I'd really recommend to move to Airflow 2.0.2 instead of 2.0.1.
   


-- 
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]


Reply via email to