mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
bullseye is the latest stable, and this is what we will be using for Cloud Native GitLab going forward so we should test with this. Since an upgrade of the operating system may break pre-compiled C extensions, we now introduce a DEBIAN environment flag that defaults to the legacy buster install but allows us to roll out a bullseye image with `debian-bullseye` as the image name prefix.
17 lines
486 B
Bash
Executable file
17 lines
486 B
Bash
Executable file
#!/bin/bash
|
|
set -xeuo pipefail
|
|
IFS=$'\n\t'
|
|
|
|
POSTGRES_VERSION=${1:-12}
|
|
DEBIAN_VERSION=${2:-buster}
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
curl -sS -L https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
|
echo "deb http://apt.postgresql.org/pub/repos/apt/ ${DEBIAN_VERSION}-pgdg main" | tee /etc/apt/sources.list.d/postgresql.list
|
|
|
|
apt-get update
|
|
apt-get install -y postgresql-client-${POSTGRES_VERSION}
|
|
|
|
apt-get autoremove -yq
|
|
apt-get clean -yqq
|
|
rm -rf /var/lib/apt/lists/*
|