File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,16 @@ USER 70:70
59
59
60
60
ENV ROX_SLIM_MODE =" true"
61
61
62
- ENTRYPOINT ["docker-entrypoint.sh"]
62
+ COPY scripts/custom-entrypoint.sh /usr/local/bin/
63
+ COPY scripts/start-db.sh /usr/local/bin/
64
+
65
+ RUN /usr/local/bin/start-db.sh
66
+ USER root
67
+ RUN rm -rf /usr/local/bin/start-db.sh && \
68
+ rm -rf /docker-entrypoint-initdb.d/*
69
+ USER 70:70
70
+ ENV DATABASE_ALREADY_EXISTS =true
71
+ ENTRYPOINT ["custom-entrypoint.sh"]
63
72
64
73
EXPOSE 5432
65
74
CMD ["postgres", "-c", "config_file =/etc/postgresql.conf"]
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ if [ ! -d "/var/lib/postgresql/data/pgdata" ]; then
32
32
if [ -n " $POSTGRES_PASSWORD " ]; then
33
33
PGPASSWORD=postgres psql -c " ALTER USER postgres WITH PASSWORD '$POSTGRES_PASSWORD ';"
34
34
elif [ -n " $POSTGRES_PASSWORD_FILE " ]; then
35
- PGPASSWORD=$( cat " $POSTGRES_PASSWORD_FILE " ) psql -c " ALTER USER postgres WITH PASSWORD '$POSTGRES_PASSWORD ';"
35
+ PGPASSWORD=postgres psql -c " ALTER USER postgres WITH PASSWORD '$( cat " $POSTGRES_PASSWORD_FILE " ) ';"
36
36
fi
37
37
38
38
echo " Renaming postgres user if necessary..."
You can’t perform that action at this time.
0 commit comments