Windows 10 Docker : /usr/bin/env: 'php\r': 没有这样的文件或目录
2022-08-30 23:05:47
我有一个docker-compose.yml文件,我在其中定义了php的图像和构建。它为带有php,nginx和postgresql的Symfony应用程序而制作,带有postgis:
version: '2'
services:
front:
image: nginx
ports:
- "81:80"
links:
- "engine:engine"
- "db:db"
volumes:
- ".:/home/docker:ro"
- "./docker/front/default.conf:/etc/nginx/conf.d/default.conf:ro"
engine:
build: ./docker/engine/
volumes:
- ".:/home/docker:rw"
- "./docker/engine/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro"
links:
- "db:db"
working_dir: "/home/docker"
db:
image: camptocamp/postgres:9.6
ports:
- "5433:5432"
environment:
- "POSTGRES_DB=pfe"
- "POSTGRES_PASSWORD=admin"
- "POSTGRES_USER=admin"
- "PGDATA=/var/lib/postgresql/data/pgdata"
在Ubuntu上一切正常,但是当我尝试在Windows 10上运行相同的环境时,我得到了一个错误。
docker-compose exec engine bin/console doctrine:schema:create
/usr/bin/env: 'php\r': No such file or directory