首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么扩展docker-airflow镜像,使我的调度程序容器不健康?

为什么扩展docker-airflow镜像,使我的调度程序容器不健康?
EN

Stack Overflow用户
提问于 2021-06-16 18:34:00
回答 1查看 382关注 0票数 0

我正在使用官方docker yml文件运行airflow。official documentation

我使用以下dockerfile扩展了我的镜像:

代码语言:javascript
复制
FROM apache/airflow:2.0.2
USER root
RUN apt-get update
USER airflow
RUN pip install --no-cache-dir plotly==4.9
RUN pip install --no-cache-dir svglib==1.1.0
RUN pip install --no-cache-dir fpdf2

这样做会导致我的调度程序conatiner变得不健康

如何解决此问题?

unhealth scheduler container after extending the official image

这是我从容器中获得的日志:

代码语言:javascript
复制
{
  "Status": "unhealthy",
  "FailingStreak": 7,
  "Log": [
    {
      "Start": "2021-06-16T12:53:53.059066625Z",
      "End": "2021-06-16T12:53:53.843581477Z",
      "ExitCode": 2,
      "Output": "\nairflow command error: argument GROUP_OR_COMMAND: invalid choice: 'jobs' (choose from 'celery', 'cheat-sheet', 'config', 'connections', 'dags', 'db', 'info', 'kerberos', 'kubernetes', 'plugins', 'pools', 'providers', 'roles', 'rotate-fernet-key', 'scheduler', 'sync-perm', 'tasks', 'users', 'variables', 'version', 'webserver'), see help above.\nusage: airflow [-h] GROUP_OR_COMMAND ...\n\npositional arguments:\n  GROUP_OR_COMMAND\n\n    Groups:\n      celery         Celery components\n      config         View configuration\n      connections    Manage connections\n      dags           Manage DAGs\n      db             Database operations\n      kubernetes     Tools to help run the KubernetesExecutor\n      pools          Manage pools\n      providers      Display providers\n      roles          Manage roles\n      tasks          Manage tasks\n      users          Manage users\n      variables      Manage variables\n\n    Commands:\n      cheat-sheet    Display cheat sheet\n      info           Show information about current Airflow and environment\n      kerberos       Start a kerberos ticket renewer\n      plugins        Dump information about loaded plugins\n      rotate-fernet-key\n                     Rotate encrypted connection credentials and variables\n      scheduler      Start a scheduler instance\n      sync-perm      Update permissions for existing roles and DAGs\n      version        Show the version\n      webserver      Start a Airflow webserver instance\n\noptional arguments:\n  -h, --help         show this help message and exit\n"
    }

提前感谢!

EN

回答 1

Stack Overflow用户

发布于 2021-06-16 21:53:38

我找到了我的问题的解决方案。

在我的扩展图像中,我使用的是airflow 2.0.2,这是不兼容的。升级到airflow 2.1.0解决了我的问题。

代码语言:javascript
复制
FROM apache/airflow:2.1.0
USER root
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
         build-essential libopenmpi-dev \
  && apt-get autoremove -yqq --purge \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/*
RUN apt-get update
USER airflow
RUN pip install --no-cache-dir plotly==4.9
RUN pip install --no-cache-dir svglib==1.1.0
RUN pip install --no-cache-dir fpdf2
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68001003

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档