Files
postgresql15/Dockerfile
Bernhard Radermacher 95caa2654c fix
2026-02-25 15:47:33 +01:00

30 lines
860 B
Docker

FROM postgres:15
RUN mkdir -p "$PGDATA" && \
chmod 00700 "$PGDATA" && \
mkdir -p /var/run/postgresql && \
chmod 03755 /var/run/postgresql
RUN apt-get update && \
apt-get install -y --no-install-recommends \
postgresql-15-pgpool2 \
&& \
rm -rf /var/lib/apt/lists/* && \
RUN apt-get update && \
apt-get install -y --no-install-recommends \
openssh-server \
sudo \
&& \
rm -rf /var/lib/apt/lists/* && \
printf "\npostgres ALL = (ALL) NOPASSWD:ALL\n" >> /etc/sudoers && \
printf "\nX11Forwarding no\nPasswordAuthentication no\n" >> /etc/ssh/sshd_config && \
printf "\nStrictHostKeyChecking no\n" >> /etc/ssh/ssh_config
COPY --chown=postgres:postgres postgres /var/lib/postgresql/
COPY --chmod=755 entrypoint.sh /usr/local/bin/
ENTRYPOINT ["entrypoint.sh"]