1+ FROM quay.io/enterprisedb/edb-postgres-advanced:10.22
2+ USER root
3+ RUN chown -R postgres:postgres /var/lib/edb && chmod 777 /var/lib/edb && mkdir /docker-entrypoint-initdb.d
4+
5+ # FROM quay.io/enterprisedb/edb-postgres-advanced:11.17-3.2-postgis
6+ # USER root
7+ # this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
8+ # RUN chown -R postgres:postgres /var/lib/edb && chmod 777 /var/lib/edb && rm /docker-entrypoint-initdb.d/10_postgis.sh
9+
10+ USER postgres
11+ ENV LANG en_US.utf8
12+ ENV PG_MAJOR 10
13+ ENV PG_VERSION 10
14+ ENV PGPORT 5444
15+ ENV PGDATA /var/lib/edb/as$PG_MAJOR/data/
16+ VOLUME /var/lib/edb/as$PG_MAJOR/data/
17+
18+ COPY docker-entrypoint.sh /usr/local/bin/
19+ ENTRYPOINT ["docker-entrypoint.sh" ]
20+
21+ # We set the default STOPSIGNAL to SIGINT, which corresponds to what PostgreSQL
22+ # calls "Fast Shutdown mode" wherein new connections are disallowed and any
23+ # in-progress transactions are aborted, allowing PostgreSQL to stop cleanly and
24+ # flush tables to disk, which is the best compromise available to avoid data
25+ # corruption.
26+ #
27+ # Users who know their applications do not keep open long-lived idle connections
28+ # may way to use a value of SIGTERM instead, which corresponds to "Smart
29+ # Shutdown mode" in which any existing sessions are allowed to finish and the
30+ # server stops when all sessions are terminated.
31+ #
32+ # See https://www.postgresql.org/docs/12/server-shutdown.html for more details
33+ # about available PostgreSQL server shutdown signals.
34+ #
35+ # See also https://www.postgresql.org/docs/12/server-start.html for further
36+ # justification of this as the default value, namely that the example (and
37+ # shipped) systemd service files use the "Fast Shutdown mode" for service
38+ # termination.
39+ #
40+ STOPSIGNAL SIGINT
41+ #
42+ # An additional setting that is recommended for all users regardless of this
43+ # value is the runtime "--stop-timeout" (or your orchestrator/runtime's
44+ # equivalent) for controlling how long to wait between sending the defined
45+ # STOPSIGNAL and sending SIGKILL (which is likely to cause data corruption).
46+ #
47+ # The default in most runtimes (such as Docker) is 10 seconds, and the
48+ # documentation at https://www.postgresql.org/docs/12/server-start.html notes
49+ # that even 90 seconds may not be long enough in many instances.
50+
51+ EXPOSE 5444
52+ CMD ["postgres" ]
0 commit comments