add shh for postgres
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,5 +1,7 @@
|
|||||||
FROM postgres:15
|
FROM postgres:15
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
postgresql-$PG_MAJOR-repmgr \
|
postgresql-$PG_MAJOR-repmgr \
|
||||||
@@ -9,7 +11,17 @@ RUN apt-get update && \
|
|||||||
RUN install --verbose --directory --owner postgres --group postgres --mode 1777 /etc/repmgr
|
RUN install --verbose --directory --owner postgres --group postgres --mode 1777 /etc/repmgr
|
||||||
VOLUME /etc/repmgr
|
VOLUME /etc/repmgr
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
openssh-server \
|
||||||
|
&& \
|
||||||
|
rm -rf /var/lib/apt/lists/* \
|
||||||
|
mkdir -p /var/lib/postgresql/.ssh \
|
||||||
|
chmod 700 /var/lib/postgresql/.ssh \
|
||||||
|
chown postgres: /var/lib/postgresql/.ssh
|
||||||
|
|
||||||
COPY --chmod=644 --chown=postgres profile /var/lib/postgresql/.profile
|
COPY --chmod=644 --chown=postgres profile /var/lib/postgresql/.profile
|
||||||
|
COPY --chmod=600 --chown=postgres authorized_keys id_e25519 /var/lib/postgresql/.ssh/
|
||||||
|
|
||||||
COPY --chmod=755 entrypoint.sh /usr/local/bin/
|
COPY --chmod=755 entrypoint.sh /usr/local/bin/
|
||||||
|
|
||||||
|
|||||||
0
authorized_keys
Normal file
0
authorized_keys
Normal file
0
id_ed25519
Normal file
0
id_ed25519
Normal file
Reference in New Issue
Block a user