diff --git a/infrastructure/docker/image/Dockerfile b/infrastructure/docker/image/Dockerfile index 3f87e02..e7b61da 100644 --- a/infrastructure/docker/image/Dockerfile +++ b/infrastructure/docker/image/Dockerfile @@ -1,7 +1,5 @@ FROM ubuntu:jammy -ARG DEBIAN_FRONTEND=noninteractive - # install it ADD resources /tmp/ -RUN /tmp/install.sh +RUN DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes /tmp/install.sh diff --git a/infrastructure/docker/image/resources/install.sh b/infrastructure/docker/image/resources/install.sh index 4c37cd4..781fe16 100755 --- a/infrastructure/docker/image/resources/install.sh +++ b/infrastructure/docker/image/resources/install.sh @@ -1,16 +1,17 @@ #!/bin/bash -set -eux +set -exo pipefail function main() { - apt update > /dev/null; - apt install -qqy ca-certificates curl wget gnupg > /dev/null + { + apt-get update + apt-get upgrade -y + apt-get install -qqy ca-certificates curl gnupg postgresql-client-14 + } > /dev/null + mkdir /usr/share/postgresql-common/pgdg + curl -Sso /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - - - apt update > /dev/null; - apt -qqy install wget postgresql-client-14 restic > /dev/null; - + update-ca-certificates install -m 0400 /tmp/functions.sh /usr/local/lib/