FROM postgres:13

ENV PG_MAJOR 13

RUN apt-get update && \
  apt-get install -y --no-install-recommends \
  postgresql-$PG_MAJOR-pldebugger

COPY init /docker-entrypoint-initdb.d
COPY debugger-setup.sh /docker-entrypoint-initdb.d

# Run below in DB to enable the extension:
# CREATE EXTENSION pldbgapi;
