我在使用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
1条答案
按热度按时间toe950271#
首先,在entrypoint.sh入口点文件所在的airflow文件夹中使用以下命令给予www.example.com权限
接下来的事情是使脚本在容器中可执行。
得到了同样的问题,并能够解决它与这个。