Syntax Error on Docker-compose yaml file

Hello,

I am doing Docker-Compose Lab exercises. Everything is fine except on the last question of

Create a docker-compose.yml file under the path /root/wordpress . Once done, run a docker-compose up.

The compose file should have exact specification of the wordpress and db container

All my cases are passed except the Syntax error

  • Syntax Check for the docker-compose.yml FAILED
  • Wordpress running on the correct HostPort? PASSED
  • WordPress linked to db container PASSED
  • db container running with env variable POSTGRES_PASSWORD? PASSED

I have tried so many times removing all unnecessary spaces and everything. Can someone please help why this is happening, when the docker is able to read the YAML file then why the Test lab shows the syntax as not right?

My latest file is like this:
services:
wordpress:
image: wordpress
links:
- db
ports:
- 8085:80
db:
image: postgres
enviornment:
POSTGRES_PASSWORD: mysecretpassword
version: ‘3.0’

Hello @raghutiwari12345,

Welcome to our community!

Note: In YAML try to avoid use tabs and use spaces instead.

Try and compare your docker-compose file with the file exists in /var/answers.

I just checked this . Checks are passing now .
Thanks

with best regards
Pradeep Nehe

You are welcome.
Happy learning!