blob: ff4ffa42919a98542cfa2637e5dc11cf51043277 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/usr/bin/env bash
set -Eeo pipefail
pUID=$(id -u postgres)
pGID=$(id -g postgres)
if [ -z "$pUID" ]
then
echo "Unable to find postgres user id, required in order to chown key material"
exit 1
fi
if [ -z "$pGID" ]
then
echo "Unable to find postgres group id, required in order to chown key material"
exit 1
fi
chown "$pUID":"$pGID" \
/tmp/testcontainers-go/postgres/ca_cert.pem \
/tmp/testcontainers-go/postgres/server.cert \
/tmp/testcontainers-go/postgres/server.key
/usr/local/bin/docker-entrypoint.sh "$@"
|