This commit is contained in:
Bernhard Radermacher
2026-02-25 15:00:50 +01:00
commit 3b48965afe
5 changed files with 172 additions and 0 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
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 \
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"]