add ssh access for pgbackrest

16.4
Juanique Voogt 2024-09-26 13:15:09 +02:00
rodzic dffc4c9d18
commit 3628f9db9e
1 zmienionych plików z 12 dodań i 4 usunięć

Wyświetl plik

@ -64,21 +64,32 @@ RUN apt-get -y --purge autoremove \
&& rm -rf /var/lib/apt/lists/*
##############################################################################
# Production Stage #
##############################################################################
##############################################################################
# Production Stage #
##############################################################################
FROM postgis-base AS postgis-prod
USER root
# Reset ARG for version
ARG IMAGE_VERSION
ARG POSTGRES_MAJOR_VERSION=16
ARG POSTGIS_MAJOR_VERSION=3
ARG POSTGIS_MINOR_RELEASE=4
# https://packagecloud.io/timescale/timescaledb
ARG TIMESCALE_VERSION=2
ARG BUILD_TIMESCALE=true
# Install ssh and ufw
RUN apt-get update && \
apt-get install -y openssh-server ufw && \
ufw allow 22 && \
echo "y" | ufw enable || true
# Start the SSH service
RUN service ssh start
RUN set -eux \
&& export DEBIAN_FRONTEND=noninteractive \
@ -90,7 +101,6 @@ RUN set -eux \
&& rm -rf /var/lib/apt/lists/* \
&& dpkg-divert --local --rename --add /sbin/initctl
#-------------Application Specific Stuff ----------------------------------------------------
# We add postgis as well to prevent build errors (that we don't see on local builds)
@ -151,10 +161,8 @@ RUN set -eux \
&& /scripts/setup.sh; rm /scripts/.pass_*
RUN echo 'figlet -t "Kartoza Docker PostGIS"' >> ~/.bashrc
ENTRYPOINT ["/bin/bash", "/scripts/docker-entrypoint.sh"]
##############################################################################
# Testing Stage #
##############################################################################