File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
cohorts/2025/01-docker-terraform Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -15,20 +15,14 @@ Answer: `24.3.1`
1515
1616- Spin that docker-compose.yml with ` docker compose up -d `
1717- Log into pgadmin container with: ` docker exec -it pgadmin bash `
18- - Test connectivity with ` ping `
18+ - Test connectivity with ` nc `
1919
2020``` shell
21- 554604249e08:/pgadmin4$ ping db
22- PING db (172.22.0.2): 56 data bytes
23- 64 bytes from 172.22.0.2: seq=0 ttl=42 time=0.191 ms
24- 64 bytes from 172.22.0.2: seq=1 ttl=42 time=0.370 ms
25- 64 bytes from 172.22.0.2: seq=2 ttl=42 time=0.140 ms
26-
27- 554604249e08:/pgadmin4$ ping postgres
28- PING postgres (172.22.0.2): 56 data bytes
29- 64 bytes from 172.22.0.2: seq=0 ttl=42 time=0.277 ms
30- 64 bytes from 172.22.0.2: seq=1 ttl=42 time=0.408 ms
31- 64 bytes from 172.22.0.2: seq=2 ttl=42 time=0.193 ms
21+ a9f4522e9e0b:/pgadmin4$ nc -zv db 5432
22+ db (172.18.0.3:5432) open
23+
24+ a9f4522e9e0b:/pgadmin4$ nc -zv postgres 5432
25+ postgres (172.18.0.3:5432) open
3226```
3327
3428Both the service name (` db ` ) and the container name (` postgres ` ) can be used.
You can’t perform that action at this time.
0 commit comments