You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-11-19 00:22:57 +03:00
Merge pull request #485 from infosiftr/postgres-11-clang
Add "stretch-backports" to 11+ for clang-6.0
This commit is contained in:
@@ -75,6 +75,9 @@ ENV PG_VERSION 10.5-1.pgdg90+1
|
|||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
|
# see note below about "*.pyc" files
|
||||||
|
export PYTHONDONTWRITEBYTECODE=1; \
|
||||||
|
\
|
||||||
dpkgArch="$(dpkg --print-architecture)"; \
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
case "$dpkgArch" in \
|
case "$dpkgArch" in \
|
||||||
amd64|i386|ppc64el) \
|
amd64|i386|ppc64el) \
|
||||||
@@ -87,6 +90,15 @@ RUN set -ex; \
|
|||||||
# let's build binaries from their published source packages
|
# 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/ stretch-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; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
|
\
|
||||||
tempDir="$(mktemp -d)"; \
|
tempDir="$(mktemp -d)"; \
|
||||||
cd "$tempDir"; \
|
cd "$tempDir"; \
|
||||||
\
|
\
|
||||||
@@ -135,7 +147,10 @@ RUN set -ex; \
|
|||||||
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
||||||
apt-get purge -y --auto-remove; \
|
apt-get purge -y --auto-remove; \
|
||||||
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
||||||
fi
|
fi; \
|
||||||
|
\
|
||||||
|
# some of the steps above generate a lot of "*.pyc" files (and setting "PYTHONDONTWRITEBYTECODE" beforehand doesn't propagate properly for some reason), so we clean them up manually (as long as they aren't owned by a package)
|
||||||
|
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||||
|
|
||||||
# make the sample config easier to munge (and "correct by default")
|
# make the sample config easier to munge (and "correct by default")
|
||||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ ENV PG_VERSION 11~beta3-1.pgdg90+2
|
|||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
|
# see note below about "*.pyc" files
|
||||||
|
export PYTHONDONTWRITEBYTECODE=1; \
|
||||||
|
\
|
||||||
dpkgArch="$(dpkg --print-architecture)"; \
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
case "$dpkgArch" in \
|
case "$dpkgArch" in \
|
||||||
amd64|i386|ppc64el) \
|
amd64|i386|ppc64el) \
|
||||||
@@ -87,6 +90,15 @@ RUN set -ex; \
|
|||||||
# let's build binaries from their published source packages
|
# 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/ stretch-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; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
|
\
|
||||||
tempDir="$(mktemp -d)"; \
|
tempDir="$(mktemp -d)"; \
|
||||||
cd "$tempDir"; \
|
cd "$tempDir"; \
|
||||||
\
|
\
|
||||||
@@ -135,7 +147,10 @@ RUN set -ex; \
|
|||||||
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
||||||
apt-get purge -y --auto-remove; \
|
apt-get purge -y --auto-remove; \
|
||||||
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
||||||
fi
|
fi; \
|
||||||
|
\
|
||||||
|
# some of the steps above generate a lot of "*.pyc" files (and setting "PYTHONDONTWRITEBYTECODE" beforehand doesn't propagate properly for some reason), so we clean them up manually (as long as they aren't owned by a package)
|
||||||
|
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||||
|
|
||||||
# make the sample config easier to munge (and "correct by default")
|
# make the sample config easier to munge (and "correct by default")
|
||||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ ENV PG_VERSION 9.3.24-1.pgdg90+1
|
|||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
|
# see note below about "*.pyc" files
|
||||||
|
export PYTHONDONTWRITEBYTECODE=1; \
|
||||||
|
\
|
||||||
dpkgArch="$(dpkg --print-architecture)"; \
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
case "$dpkgArch" in \
|
case "$dpkgArch" in \
|
||||||
amd64|i386|ppc64el) \
|
amd64|i386|ppc64el) \
|
||||||
@@ -87,6 +90,15 @@ RUN set -ex; \
|
|||||||
# let's build binaries from their published source packages
|
# 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/ stretch-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; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
|
\
|
||||||
tempDir="$(mktemp -d)"; \
|
tempDir="$(mktemp -d)"; \
|
||||||
cd "$tempDir"; \
|
cd "$tempDir"; \
|
||||||
\
|
\
|
||||||
@@ -136,7 +148,10 @@ RUN set -ex; \
|
|||||||
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
||||||
apt-get purge -y --auto-remove; \
|
apt-get purge -y --auto-remove; \
|
||||||
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
||||||
fi
|
fi; \
|
||||||
|
\
|
||||||
|
# some of the steps above generate a lot of "*.pyc" files (and setting "PYTHONDONTWRITEBYTECODE" beforehand doesn't propagate properly for some reason), so we clean them up manually (as long as they aren't owned by a package)
|
||||||
|
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||||
|
|
||||||
# make the sample config easier to munge (and "correct by default")
|
# make the sample config easier to munge (and "correct by default")
|
||||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ ENV PG_VERSION 9.4.19-1.pgdg90+1
|
|||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
|
# see note below about "*.pyc" files
|
||||||
|
export PYTHONDONTWRITEBYTECODE=1; \
|
||||||
|
\
|
||||||
dpkgArch="$(dpkg --print-architecture)"; \
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
case "$dpkgArch" in \
|
case "$dpkgArch" in \
|
||||||
amd64|i386|ppc64el) \
|
amd64|i386|ppc64el) \
|
||||||
@@ -87,6 +90,15 @@ RUN set -ex; \
|
|||||||
# let's build binaries from their published source packages
|
# 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/ stretch-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; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
|
\
|
||||||
tempDir="$(mktemp -d)"; \
|
tempDir="$(mktemp -d)"; \
|
||||||
cd "$tempDir"; \
|
cd "$tempDir"; \
|
||||||
\
|
\
|
||||||
@@ -136,7 +148,10 @@ RUN set -ex; \
|
|||||||
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
||||||
apt-get purge -y --auto-remove; \
|
apt-get purge -y --auto-remove; \
|
||||||
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
||||||
fi
|
fi; \
|
||||||
|
\
|
||||||
|
# some of the steps above generate a lot of "*.pyc" files (and setting "PYTHONDONTWRITEBYTECODE" beforehand doesn't propagate properly for some reason), so we clean them up manually (as long as they aren't owned by a package)
|
||||||
|
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||||
|
|
||||||
# make the sample config easier to munge (and "correct by default")
|
# make the sample config easier to munge (and "correct by default")
|
||||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ ENV PG_VERSION 9.5.14-1.pgdg90+1
|
|||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
|
# see note below about "*.pyc" files
|
||||||
|
export PYTHONDONTWRITEBYTECODE=1; \
|
||||||
|
\
|
||||||
dpkgArch="$(dpkg --print-architecture)"; \
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
case "$dpkgArch" in \
|
case "$dpkgArch" in \
|
||||||
amd64|i386|ppc64el) \
|
amd64|i386|ppc64el) \
|
||||||
@@ -87,6 +90,15 @@ RUN set -ex; \
|
|||||||
# let's build binaries from their published source packages
|
# 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/ stretch-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; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
|
\
|
||||||
tempDir="$(mktemp -d)"; \
|
tempDir="$(mktemp -d)"; \
|
||||||
cd "$tempDir"; \
|
cd "$tempDir"; \
|
||||||
\
|
\
|
||||||
@@ -136,7 +148,10 @@ RUN set -ex; \
|
|||||||
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
||||||
apt-get purge -y --auto-remove; \
|
apt-get purge -y --auto-remove; \
|
||||||
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
||||||
fi
|
fi; \
|
||||||
|
\
|
||||||
|
# some of the steps above generate a lot of "*.pyc" files (and setting "PYTHONDONTWRITEBYTECODE" beforehand doesn't propagate properly for some reason), so we clean them up manually (as long as they aren't owned by a package)
|
||||||
|
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||||
|
|
||||||
# make the sample config easier to munge (and "correct by default")
|
# make the sample config easier to munge (and "correct by default")
|
||||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ ENV PG_VERSION 9.6.10-1.pgdg90+1
|
|||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
|
# see note below about "*.pyc" files
|
||||||
|
export PYTHONDONTWRITEBYTECODE=1; \
|
||||||
|
\
|
||||||
dpkgArch="$(dpkg --print-architecture)"; \
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
case "$dpkgArch" in \
|
case "$dpkgArch" in \
|
||||||
amd64|i386|ppc64el) \
|
amd64|i386|ppc64el) \
|
||||||
@@ -87,6 +90,15 @@ RUN set -ex; \
|
|||||||
# let's build binaries from their published source packages
|
# 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/ stretch-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; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
|
\
|
||||||
tempDir="$(mktemp -d)"; \
|
tempDir="$(mktemp -d)"; \
|
||||||
cd "$tempDir"; \
|
cd "$tempDir"; \
|
||||||
\
|
\
|
||||||
@@ -136,7 +148,10 @@ RUN set -ex; \
|
|||||||
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
||||||
apt-get purge -y --auto-remove; \
|
apt-get purge -y --auto-remove; \
|
||||||
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
||||||
fi
|
fi; \
|
||||||
|
\
|
||||||
|
# some of the steps above generate a lot of "*.pyc" files (and setting "PYTHONDONTWRITEBYTECODE" beforehand doesn't propagate properly for some reason), so we clean them up manually (as long as they aren't owned by a package)
|
||||||
|
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||||
|
|
||||||
# make the sample config easier to munge (and "correct by default")
|
# make the sample config easier to munge (and "correct by default")
|
||||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ ENV PG_VERSION %%PG_VERSION%%
|
|||||||
|
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
\
|
\
|
||||||
|
# see note below about "*.pyc" files
|
||||||
|
export PYTHONDONTWRITEBYTECODE=1; \
|
||||||
|
\
|
||||||
dpkgArch="$(dpkg --print-architecture)"; \
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
case "$dpkgArch" in \
|
case "$dpkgArch" in \
|
||||||
%%ARCH_LIST%%) \
|
%%ARCH_LIST%%) \
|
||||||
@@ -87,6 +90,15 @@ RUN set -ex; \
|
|||||||
# let's build binaries from their published source packages
|
# let's build binaries from their published source packages
|
||||||
echo "deb-src http://apt.postgresql.org/pub/repos/apt/ %%DEBIAN_SUITE%%-pgdg main $PG_MAJOR" > /etc/apt/sources.list.d/pgdg.list; \
|
echo "deb-src http://apt.postgresql.org/pub/repos/apt/ %%DEBIAN_SUITE%%-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 %%DEBIAN_SUITE%%-backports main' >> /etc/apt/sources.list.d/pgdg.list; \
|
||||||
|
;; \
|
||||||
|
esac; \
|
||||||
|
\
|
||||||
tempDir="$(mktemp -d)"; \
|
tempDir="$(mktemp -d)"; \
|
||||||
cd "$tempDir"; \
|
cd "$tempDir"; \
|
||||||
\
|
\
|
||||||
@@ -136,7 +148,10 @@ RUN set -ex; \
|
|||||||
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
|
||||||
apt-get purge -y --auto-remove; \
|
apt-get purge -y --auto-remove; \
|
||||||
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
|
||||||
fi
|
fi; \
|
||||||
|
\
|
||||||
|
# some of the steps above generate a lot of "*.pyc" files (and setting "PYTHONDONTWRITEBYTECODE" beforehand doesn't propagate properly for some reason), so we clean them up manually (as long as they aren't owned by a package)
|
||||||
|
find /usr -name '*.pyc' -type f -exec bash -c 'for pyc; do dpkg -S "$pyc" &> /dev/null || rm -vf "$pyc"; done' -- '{}' +
|
||||||
|
|
||||||
# make the sample config easier to munge (and "correct by default")
|
# make the sample config easier to munge (and "correct by default")
|
||||||
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
RUN mv -v "/usr/share/postgresql/$PG_MAJOR/postgresql.conf.sample" /usr/share/postgresql/ \
|
||||||
|
|||||||
Reference in New Issue
Block a user