initial
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user