Fix: Add -it flags to docker run commands for interactive PostgreSQL client access in lab-05-database
This commit is contained in:
@@ -112,7 +112,7 @@ Puoi connetterti SOLO da container nella stessa rete privata.
|
||||
Esegui da un client PostgreSQL temporaneo collegato alla rete privata:
|
||||
```bash
|
||||
# Connettiti da un client nella stessa rete privata
|
||||
docker run --rm --network lab05-vpc-private \
|
||||
docker run --rm -it --network lab05-vpc-private \
|
||||
-e PGPASSWORD=lab05_password \
|
||||
postgres:16-alpine \
|
||||
psql -h db -U lab05_user -d lab05_db
|
||||
|
||||
@@ -66,7 +66,7 @@ psql -h localhost -U lab05_user -d lab05_db 2>&1 || echo "Corretto: non accessib
|
||||
docker exec lab05-app ping -c 2 db
|
||||
|
||||
# Prova query SQL da un client nella rete privata (DEVE riuscire)
|
||||
docker run --rm --network lab05-vpc-private \
|
||||
docker run --rm -it --network lab05-vpc-private \
|
||||
-e PGPASSWORD=lab05_password \
|
||||
postgres:16-alpine \
|
||||
psql -h db -U lab05_user -d lab05_db -c "SELECT 1;"
|
||||
|
||||
Reference in New Issue
Block a user