I am getting below error for docker-compose where I have provided both the docker-composer.yml file and the error below
$ cat docker-compose.yml
db:
image: postgres
wordpress:
image: wordpress
ports:
- 8085:80
links: - db
$ sudo docker-compose up
Creating root_db_1 …
Creating root_db_1 … done
Creating root_wordpress_1 …
Creating root_wordpress_1 … error
ERROR: for root_wordpress_1 Cannot start service wordpress: Cannot link to a non running container: /root_db_1 AS /root_wordpress_1/db
ERROR: for wordpress Cannot start service wordpress: Cannot link to a non running container: /root_db_1 AS /root_wordpress_1/db
ERROR: Encountered errors while bringing up the project.