Probleme symfony "conteneur DOCKER"

Par SEDI, il y a 3 ans


Bonjour je cherche a " docker-compose up -d "

voici mon ficher " docker compose.yml "

version: '3' services: ###> doctrine/doctrine-bundle ### database: image: postgres:${POSTGRES_VERSION:-13}-alpine environment: POSTGRES_DB: ${POSTGRES_DB:-app} # You should definitely change the password in production POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ChangeMe} POSTGRES_USER: ${POSTGRES_USER:-symfony} volumes: - db-data:/var/lib/postgresql/data:rw # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data! # - ./docker/db/data:/var/lib/postgresql/data:rw ###< doctrine/doctrine-bundle ### volumes: ###> doctrine/doctrine-bundle ### db-data: ###< doctrine/doctrine-bundle ### mailer: image: schickling/mailcatcher ports: [1025, 1080]

Voici le message que j'obtient lorsque je lance la commande " docker-compose up -d " :

ERROR: The Compose file '.\docker-compose.yml' is invalid because:
volumes.mailer value 'image', 'ports' do not match any of the regexes: '^x-'

est ce que quelqun peut m'aider svp ?

1 réponse

popotte, il y a 3 ans

Hello, alors le problème c'est ton indentation, ton fichier doit avoir une indentation de 2 espaces, ton fichier est bon sauf dans la partie mailer où il y a 4espaces :)