1
0
mirror of https://github.com/docker-library/postgres.git synced 2025-07-31 09:04:30 +03:00

Update 12+ to buster

This is an initial attempt to get ahead of https://github.com/docker-library/postgres/issues/582 at least for newer PostgreSQL releases.
This commit is contained in:
Tianon Gravi
2019-05-30 13:28:13 -07:00
parent 5992d8be75
commit 966d1ba7a6
2 changed files with 12 additions and 7 deletions

View File

@ -1,5 +1,5 @@
# vim:set ft=dockerfile:
FROM debian:stretch-slim
FROM debian:buster-slim
RUN set -ex; \
if ! command -v gpg > /dev/null; then \
@ -71,7 +71,7 @@ RUN set -ex; \
apt-key list
ENV PG_MAJOR 12
ENV PG_VERSION 12~beta1-1.pgdg90+1
ENV PG_VERSION 12~beta1-1.pgdg100+1
RUN set -ex; \
\
@ -82,20 +82,20 @@ RUN set -ex; \
case "$dpkgArch" in \
amd64|i386|ppc64el) \
# arches officialy built by upstream
echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \
echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \
apt-get update; \
;; \
*) \
# we're on an architecture upstream doesn't officially build for
# let's build binaries from their published source packages
echo "deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \
echo "deb-src http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \
\
case "$PG_MAJOR" in \
9.* | 10 ) ;; \
*) \
# https://github.com/docker-library/postgres/issues/484 (clang-6.0 required, only available in stretch-backports)
# TODO remove this once we hit buster+
echo 'deb http://deb.debian.org/debian stretch-backports main' >> /etc/apt/sources.list.d/pgdg.list; \
echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list.d/pgdg.list; \
;; \
esac; \
\

View File

@ -12,9 +12,14 @@ versions=( "${versions[@]%/}" )
# sort version numbers with highest last (so it goes first in .travis.yml)
IFS=$'\n'; versions=( $(echo "${versions[*]}" | sort -V) ); unset IFS
defaultDebianSuite='stretch-slim'
defaultDebianSuite='buster-slim'
declare -A debianSuite=(
#[9.6]='jessie'
# https://github.com/docker-library/postgres/issues/582
[9.4]='stretch-slim'
[9.5]='stretch-slim'
[9.6]='stretch-slim'
[10]='stretch-slim'
[11]='stretch-slim'
)
defaultAlpineVersion='3.9'
declare -A alpineVersion=(