From a040a87f865a06f6ab773a967786edaeeb1b4734 Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 12 Mar 2021 15:40:26 +0100 Subject: [PATCH] cleanup the image --- .../docker/image/resources/install.sh | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/infrastructure/docker/image/resources/install.sh b/infrastructure/docker/image/resources/install.sh index c27c1c5..ee629b7 100755 --- a/infrastructure/docker/image/resources/install.sh +++ b/infrastructure/docker/image/resources/install.sh @@ -1,15 +1,22 @@ #!/bin/bash -apt-get update > /dev/null; -apt-get install -qqy ca-certificates curl wget gnupg > /dev/null -sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list' -wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - +function main() { + apt-get update > /dev/null; + apt-get install -qqy ca-certificates curl wget gnupg > /dev/null + sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list' + wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - -apt-get update > /dev/null; -apt-get -qqy install wget postgresql-client-13 restic > /dev/null; + apt-get update > /dev/null; + apt-get -qqy install wget postgresql-client-13 restic > /dev/null; -update-ca-certificates + update-ca-certificates -install -m 0400 /tmp/functions.sh /usr/local/lib/ -install -m 0400 /tmp/pg-functions.sh /usr/local/lib/ -install -m 0400 /tmp/file-functions.sh /usr/local/lib/ + install -m 0400 /tmp/functions.sh /usr/local/lib/ + install -m 0400 /tmp/pg-functions.sh /usr/local/lib/ + install -m 0400 /tmp/file-functions.sh /usr/local/lib/ + + cleanupDocker +} + +source /tmp/install_functions.sh +main