diff --git a/Dockerfile b/Dockerfile index df85a31..16c057b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 # ##############################################################################