docker 坞站-组合:OCI运行时创建失败,www.example.com没有此类文件或目录entrypoint.sh

8xiog9wr  于 2023-01-29  发布在  Docker
关注(0)|答案(1)|浏览(144)

我在使用www.example.com文件时很难运行docker-compose。即使我在文件上运行了chmod + x,我还是收到了这个错误。知道我做错了什么吗?entrypoint.sh file. I am receiving this error even though I have run chmod +x on the file. Any idea what I am doing wrong?

ERROR: for airflow_webserver_1  Cannot start service webserver: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"./airflow/scripts/entrypoint.sh\": stat ./airflow/scripts/entrypoint.sh: no such file or directory": unknown

文件夹结构:

|--airflow
   |--dags
   |--logs
   |--scripts
      |--entrypoint.sh
|--.env
|--docker-compose.yml

entrypoint.sh:

#!/bin/sh
airflow db init
airflow webserver

docker-compose.yml

version: '3.0'
services:
  webserver:
    image: apache/airflow:1.10.14
    volumes:
      - ./airflow/dags:/opt/airflow/dags
      - ./airflow/logs:/opt/airflow/logs
      - ./airflow/scripts:/opt/airflow/scripts
    ports:
      - "8080:8080"
    deploy:
      restart_policy:
        condition: on-failure
        max_attempts: 3
    env_file:
      .env
    entrypoint: ./airflow/scripts/entrypoint.sh
  scheduler:
    image: apache/airflow:1.10.14
    command: ["scheduler"]
    volumes:
      - ./airflow/dags:/opt/airflow/dags
      - ./airflow/logs:/opt/airflow/logs
    deploy:
      restart_policy:
        condition: on-failure
        max_attempts: 3
    env_file:
      .env
toe95027

toe950271#

首先,在entrypoint.sh入口点文件所在的airflow文件夹中使用以下命令给予www.example.com权限

chmod +x ./file-if-any/entrypoint.sh

接下来的事情是使脚本在容器中可执行。

RUN chmod +x ./file-if-any/entrypoint.sh

得到了同样的问题,并能够解决它与这个。

相关问题