当我启动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
app.sh
#!/bin/sh
pip install bottle==0.12.13 psycopg2==2.7.1 redis==2.10.5
python -u sender.py
答案 0 :(得分:0)
检查斜线并使文件可执行。