-1

我在启动 docker-compose 时遇到了这个问题。文件 app.sh 存在,但 docker 没有找到。我怎样才能修复这个错误?

码头工人-compose.yml:

version: '3'
volumes:
  dados:
services:
    db:
      image: postgres:9.6
      volumes:
        - dados:/var/lib/postgresql/data
        - /c/Users/Youssef/Documents/curso/email-worker-compose/scripts:/scripts
        - /c/Users/Youssef/Documents/curso/email-worker-compose/scripts/init.sql:/docker-entrypoint-initdb.d/init.sql
    frontend:
      image: nginx:1.13
      volumes:
         - /c/Users/Youssef/Documents/curso/email-worker-compose/web:/usr/share/nginx/html/
      ports:
      - 80:80
   app:
     image: python:3.6
     volumes:
       - ./app:/app
     working_dir: /app
     command: bash ./app/app.sh
     ports:
       - 8080:8080

日志:

$ docker-compose up
Creating network "emailworkercompose_default" with the default driver
Creating emailworkercompose_app_1      ... done
Creating emailworkercompose_db_1       ... done
Creating emailworkercompose_frontend_1 ... done
Attaching to emailworkercompose_frontend_1, emailworkercompose_app_1, emailworkercompose_db_1
app_1       | bash: app.sh: No such file or directory
db_1        | LOG:  database system was shut down at 2018-06-04 14:26:01 UTC
db_1        | LOG:  MultiXact member wraparound protections are now enabled
db_1        | LOG:  database system is ready to accept connections
emailworkercompose_app_1 exited with code 127

应用程序.sh

#!/bin/sh
pip install bottle==0.12.13 psycopg2==2.7.1 redis==2.10.5
python -u sender.py
4

1 回答 1

0

检查斜线并使文件可执行。

于 2018-06-04T14:22:04.900 回答