2020-12-04 17:10:24 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-12-06 10:52:42 +00:00
|
|
|
set -exo pipefail
|
2023-11-03 09:48:24 +00:00
|
|
|
|
2021-03-12 14:40:26 +00:00
|
|
|
function main() {
|
2023-12-06 10:52:42 +00:00
|
|
|
{
|
|
|
|
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
|
2023-11-03 09:51:54 +00:00
|
|
|
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
2023-12-06 10:52:42 +00:00
|
|
|
|
2021-03-12 14:40:26 +00:00
|
|
|
update-ca-certificates
|
2020-12-04 17:10:24 +00:00
|
|
|
|
2021-03-12 14:40:26 +00:00
|
|
|
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
|