#!/bin/sh set -eu . ./tests/common.sh postgres_container_name="postgres-test-$(uuidgen)" docker run --name "$postgres_container_name" -p 5432:5432 -e POSTGRES_PASSWORD=password123 -d postgres trap "docker rm -f '$postgres_container_name'; exit" EXIT for _ in $(seq 1 10); do if echo '' | PGPASSWORD=password123 psql -h 10.1.0.100 -U postgres -p 5432 postgres; then break fi sleep 1 done PGPASSWORD=password123 psql -h 10.1.0.100 -U postgres -p 5432 postgres <