Skip to content

Commit

Permalink
Update 12+ to buster
Browse files Browse the repository at this point in the history
This is an initial attempt to get ahead of docker-library#582 at least for newer PostgreSQL releases.
  • Loading branch information
tianon committed May 30, 2019
1 parent 5992d8b commit 966d1ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 5 additions & 5 deletions 12/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down Expand Up @@ -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; \
\
Expand All @@ -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; \
\
Expand Down
9 changes: 7 additions & 2 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=(
Expand Down

0 comments on commit 966d1ba

Please sign in to comment.