Postgresql 在Microsoft Server 2016上使用Docker设置Apache Airflow

Postgresql 在Microsoft Server 2016上使用Docker设置Apache Airflow,postgresql,docker-compose,airflow,windows-server-2016,Postgresql,Docker Compose,Airflow,Windows Server 2016,我正在尝试使用Docker EE设置气流,每当我运行Docker compose up airflow init命令时,都会出现以下错误 PS C:\Program Files\Docker> docker-compose up airflow-init Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-bui

我正在尝试使用Docker EE设置气流,每当我运行Docker compose up airflow init命令时,都会出现以下错误

    PS C:\Program Files\Docker> docker-compose up airflow-init
Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
Pulling postgres (postgres:)...
latest: Pulling from library/postgres
ERROR: no matching manifest for windows/amd64 10.0.14393 in the manifest list entries
我意识到这是因为图像不兼容,我需要找到a-sac2016扩展,但我无法为postgres找到一个。以下是我的docker-compose.yaml代码:

version: '3'
x-airflow-common:
  &airflow-common
  image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:2.0.1}
  environment:
    &airflow-common-env
    AIRFLOW__CORE__EXECUTOR: CeleryExecutor
    AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
    AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres/airflow
    AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0
    AIRFLOW__CORE__FERNET_KEY: ''
    AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true'
    AIRFLOW__CORE__LOAD_EXAMPLES: 'true'
  volumes:
    - ./dags:/opt/airflow/dags
    - ./logs:/opt/airflow/logs
    - ./plugins:/opt/airflow/plugins
  user: "${AIRFLOW_UID:-50000}:${AIRFLOW_GID:-50000}"
  depends_on:
    redis:
      condition: service_healthy
    postgres:
      condition: service_healthy

services:
  postgres:
    image: postgres
    environment:
      POSTGRES_USER: airflow
      POSTGRES_PASSWORD: airflow
      POSTGRES_DB: airflow
    volumes:
      - postgres-db-volume:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "airflow"]
      interval: 5s
      retries: 5
    restart: always

  redis:
    image: redis:latest
    ports:
      - 6379:6379
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 30s
      retries: 50
    restart: always

  airflow-webserver:
    <<: *airflow-common
    command: webserver
    ports:
      - 8080:8080
    healthcheck:
      test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
      interval: 10s
      timeout: 10s
      retries: 5
    restart: always

  airflow-scheduler:
    <<: *airflow-common
    command: scheduler
    restart: always

  airflow-worker:
    <<: *airflow-common
    command: celery worker
    restart: always

  airflow-init:
    <<: *airflow-common
    command: version
    environment:
      <<: *airflow-common-env
      _AIRFLOW_DB_UPGRADE: 'true'
      _AIRFLOW_WWW_USER_CREATE: 'true'
      _AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME:-airflow}
      _AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD:-airflow}

  flower:
    <<: *airflow-common
    command: celery flower
    ports:
      - 5555:5555
    healthcheck:
      test: ["CMD", "curl", "--fail", "http://localhost:5555/"]
      interval: 10s
      timeout: 10s
      retries: 5
    restart: always

volumes:
  postgres-db-volume:
版本:“3”
x-通用:
&普通气流
图像:${AIRFLOW\u图像\u名称:-apache/AIRFLOW:2.0.1}
环境:
&气流共同环境
气流执行器:芹菜执行器
气流核心炼金术控制:postgresql+psycopg2://气流:airflow@postgres/气流
气流\芹菜\结果\后端:db+postgresql://airflow:airflow@研究生/研究生
气流芹菜经纪人URL:redis://:@redis:6379/0
气流\uuuuu芯\uuuuuu FERNET\u键:“”
气流\uuuuu核心\uuuuu DAG \uu在\u创建时暂停\uu:'真'
气流\uuuuu核心\uuuuu负载\u示例:“正确”
卷数:
-/DAG:/opt/afflow/DAG
-/日志:/opt/气流/日志
-/插件:/opt/气流/插件
用户:${AIRFLOW\u UID:-50000}:${AIRFLOW\u GID:-50000}
取决于:
redis:
状况:服务健康
博士后:
状况:服务健康
服务:
博士后:
图片:博士后
环境:
POSTGRES_用户:气流
POSTGRES_密码:0
POSTGRES_DB:气流
卷数:
-postgres db卷:/var/lib/postgresql/data
健康检查:
测试:[“CMD”、“pg_isready”、“-U”、“气流”]
间隔:5秒
重试次数:5次
重新启动:始终
redis:
图片:redis:最新版本
端口:
- 6379:6379
健康检查:
测试:[“CMD”、“redis cli”、“ping”]
间隔:5秒
超时时间:30秒
重试次数:50次
重新启动:始终
网络服务器: