Hi Even i am able to connect to wordpress.But the test case is not passing
My answer:
db:
image: postgres
environment:
POSTGRES_PASSWORD: mysecretpassword
wordpress:
image: wordpress
ports:
- 8085:80
links:
- db
The result:
X WordPress linked to db container
Try many times.
I am getting the result. But in labs page unabe to pass the testcase
Also you want me to try docker-compose up many times or click the check button many times? Tried both.
Hi - its good that its working, but I also wanted to check if you have the docker compose file in the same directory thats mentioned in the question?
The test also validates that.
Yeah. Its in the mentioned directory only.
I am also getting the same issue when creating container through docker-compose .
also does any one know
1- how to check if container is linked with which other containers ?
2-how to link running containers ?
I am also facing the same issue .Even though I am running from the path mentioned in the question .
Can anyone please look into it as many are affected now from the same problem
docker check program:
docker container inspect wordpress | jq ‘.[] | .HostConfig.Links’ | grep db
docker-compose check program:
docker container inspect wordpress_wordpress_1 | jq ‘.[] | .NetworkSettings.Networks.wordpress_default.Links’ | grep db
,so we need to use different method to pass the exam.
docker-compose.yaml
version: “2”
services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: mysecretpassword
wordpress:
image: wordpress
links:
- db:db
ports:
- “8085:80”
this worked for me as well. version 1 wouldnt work, but version 2 did.
Hi All,
Kindly check the full solution below :
services:
db:
environment:
POSTGRES_PASSWORD: mysecretpassword
image: postgres
wordpress:
image: wordpress
links:
- db
ports:
- 8085:80
version: '3.0'
Also, check my try below:
Sometimes the correct answer is located under path /var/answers/ as you can find the above answer inside it.
We do sorry for any inconvenience.
I hope this helps!
Still doesn’t work for me. The linking target remain unticked. Tried copy pasting the solution from /var/answers, same result.
Me too facing this issue. Tried using different versions also, but still cannot make that test case pass.
Facing the same issue … any solutions so far?
Is this still an issue? We had rolled out a fix earlier.
Please let me know if its still not working.
The answer is under /var/answers directory.
The following link will help resolve this (Scoll down to the bottom):