You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Airflow官方Docker Compose文件时陷入错误循环的问题求助

Airflow官方Docker Compose文件时陷入错误循环的问题求助

各位好,我现在碰到了一个Airflow Docker部署的麻烦问题,想请大家帮忙支个招:

我一开始用的是Airflow官方的docker-compose.yaml文件,指定的镜像为apache/airflow:slim-latest,结果运行docker compose up时直接报错:

ModuleNotFoundError: No module named 'psycopg2'

我想着手动装一下依赖应该就行,于是自己写了个Dockerfile来替换原镜像,内容如下:

FROM apache/airflow:slim-latest
USER root
RUN apt-get -y update && apt-get install libpq-dev build-essential -y
USER 50000
RUN pip install psycopg2
CMD []

结果替换完镜像启动后,Docker Compose直接陷入了启动失败的循环,报错信息里有这些关键内容:

ERROR - Failed to load CLI commands from executor: CeleryExecutor
...
ERROR - Ensure all dependencies are met and try again. If using a Celery based executor install a 3.3.0+ version of the Celery provider. If using a Kubernetes executor, install a 7.4.0+ version of the CNCF provider
...
ModuleNotFoundError...

本来只是缺个psycopg2,结果改完后反而触发了一堆新的依赖问题,现在服务一直启动失败循环,实在不知道该怎么调整了,有没有大佬能帮忙分析下问题出在哪?

备注:内容来源于stack exchange,提问作者Nakeuh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 08:23:15