Files
pg15/Dockerfile

32 lines
1.2 KiB
Docker
Raw Normal View History

2026-02-26 11:39:46 +01:00
FROM debian:trixie-slim
2026-02-26 11:48:04 +01:00
RUN set -eux && \
groupadd -r postgres --gid=5432 && \
useradd -r -g postgres --uid=5432 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres && \
2026-02-26 11:39:46 +01:00
install --verbose --directory --owner postgres --group postgres --mode 1755 /var/lib/postgresql
2026-02-26 11:48:04 +01:00
RUN apt-get update && \
2026-02-26 11:39:46 +01:00
apt-get install -y --no-install-recommends \
openssh-server \
sudo \
2026-02-26 11:48:04 +01:00
&& \
rm -rf /var/lib/apt/lists/* && \
echo "postgres ALL = (ALL) NOPASSWD:ALL" >> /etc/sudoers && \
echo "X11Forwarding no" >> /etc/ssh/sshd_config && \
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config && \
2026-02-26 11:39:46 +01:00
echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
2026-02-26 11:48:04 +01:00
RUN set -eux && \
grep -q '/usr/share/locale' /etc/dpkg/dpkg.cfg.d/docker && \
sed -ri '/\/usr\/share\/locale/d' /etc/dpkg/dpkg.cfg.d/docker && \
! grep -q '/usr/share/locale' /etc/dpkg/dpkg.cfg.d/docker && \
apt-get update && \
2026-02-26 11:39:46 +01:00
apt-get install -y --no-install-recommends \
2026-02-26 11:48:04 +01:00
locales && \
rm -rf /var/lib/apt/lists/* && \
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && \
locale-gen && \
2026-02-26 11:39:46 +01:00
locale -a | grep 'en_US.utf8'
ENV LANG=en_US.utf8
ENTRYPOINT ["bash"]