-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathofficial-images-test.patch
More file actions
50 lines (47 loc) · 1.88 KB
/
official-images-test.patch
File metadata and controls
50 lines (47 loc) · 1.88 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
diff -Naur official-images.orig/test/tests/postgres-basics/run.sh official-images/test/tests/postgres-basics/run.sh
--- official-images.orig/test/tests/postgres-basics/run.sh 2019-02-28 15:58:36.000000000 -0800
+++ official-images/test/tests/postgres-basics/run.sh 2019-02-28 15:43:03.000000000 -0800
@@ -8,9 +8,10 @@
export POSTGRES_USER='my cool postgres user'
export POSTGRES_PASSWORD='my cool postgres password'
export POSTGRES_DB='my cool postgres database'
+export RUNUID='1000000'
cname="postgres-container-$RANDOM-$RANDOM"
-cid="$(docker run -d -e POSTGRES_USER -e POSTGRES_PASSWORD -e POSTGRES_DB --name "$cname" "$image")"
+cid="$(docker run -d -e POSTGRES_USER -e POSTGRES_PASSWORD -e POSTGRES_DB --user $RUNUID --name "$cname" "$image")"
trap "docker rm -vf $cid > /dev/null" EXIT
psql() {
@@ -18,6 +19,7 @@
--link "$cname":postgres \
--entrypoint psql \
-e PGPASSWORD="$POSTGRES_PASSWORD" \
+ --user $RUNUID \
"$image" \
--host postgres \
--username "$POSTGRES_USER" \
diff -Naur official-images.orig/test/tests/postgres-initdb/run.sh official-images/test/tests/postgres-initdb/run.sh
--- official-images.orig/test/tests/postgres-initdb/run.sh 2019-02-28 15:58:36.000000000 -0800
+++ official-images/test/tests/postgres-initdb/run.sh 2019-02-28 15:43:48.000000000 -0800
@@ -14,6 +14,7 @@
export POSTGRES_USER='my cool postgres user'
export POSTGRES_PASSWORD='my cool postgres password'
export POSTGRES_DB='my cool postgres database'
+export RUNUID='1000000'
cname="postgres-container-$RANDOM-$RANDOM"
cid="$(
@@ -21,6 +22,7 @@
-e POSTGRES_USER \
-e POSTGRES_PASSWORD \
-e POSTGRES_DB \
+ --user $RUNUID \
--name "$cname" \
"$serverImage"
)"
@@ -31,6 +33,7 @@
--link "$cname":postgres \
--entrypoint psql \
-e PGPASSWORD="$POSTGRES_PASSWORD" \
+ --user $RUNUID \
"$image" \
--host postgres \
--username "$POSTGRES_USER" \