File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ RUN curl -sSLf https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-${
36
36
groupadd -g 70 postgres && \
37
37
adduser postgres -u 70 -g 70 -d /var/lib/postgresql -s /bin/sh && \
38
38
microdnf install \
39
- ca-certificates libicu systemd-sysv glibc-locale-source glibc-langpack-en \
39
+ ca-certificates tar libicu systemd-sysv glibc-locale-source glibc-langpack-en \
40
40
postgresql12-server && \
41
41
# The removal of /usr/share/zoneinfo from UBI minimal images is intentional.
42
42
# After building the image, the image is reduced in size as much as possible,
Original file line number Diff line number Diff line change @@ -38,7 +38,11 @@ if [ ! -d "/var/lib/postgresql/data/pgdata" ]; then
38
38
echo " Renaming postgres user if necessary..."
39
39
if [ -n " $POSTGRES_USER " ]; then
40
40
if [ " $POSTGRES_USER " != " postgres" ]; then
41
- PGPASSWORD=" $POSTGRES_PASSWORD " psql -c " ALTER USER postgres RENAME TO $POSTGRES_USER ;"
41
+ if [ -n " $POSTGRES_PASSWORD " ]; then
42
+ PGPASSWORD=" $POSTGRES_PASSWORD " psql -c " ALTER USER postgres RENAME TO $POSTGRES_USER ;"
43
+ elif [ -n " $POSTGRES_PASSWORD_FILE " ]; then
44
+ PGPASSWORD=" $( cat " $POSTGRES_PASSWORD_FILE " ) " psql -c " ALTER USER postgres RENAME TO $POSTGRES_USER ;"
45
+ fi
42
46
fi
43
47
fi
44
48
You can’t perform that action at this time.
0 commit comments