擅长:python、mysql、java
<blockquote>
<p>Is there a solution that doesn't require rebuilding the image?</p>
</blockquote>
<p>是的,现在有:目前(2021年10月v2.2.0)它作为一个环境变量提供:</p>
<pre><code>_PIP_ADDITIONAL_REQUIREMENTS
</code></pre>
<p>它在docker-compose.yml文件中使用。
正如其他一些答案所解释的那样,这应该可以在不建立完整形象的情况下实现(实际上非常好:-)</p>
<p>见:<a href="https://airflow.apache.org/docs/apache-airflow/stable/docker-compose.yaml" rel="nofollow noreferrer">https://airflow.apache.org/docs/apache-airflow/stable/docker-compose.yaml</a></p>
<p><strong>官方文件</strong>
<a href="https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#environment-variables-supported-by-docker-compose" rel="nofollow noreferrer">https://airflow.apache.org/docs/apache-airflow/stable/start/docker.html#environment-variables-supported-by-docker-compose</a></p>