@@ -34,9 +34,6 @@ ENV POSTGRESQL_VER=${POSTGRESQL_VER}
34
34
ARG POSTGRESQL_TESTING=0
35
35
ENV POSTGRESQL_TESTING=${POSTGRESQL_TESTING}
36
36
37
- # Add PostgreSQL's repository
38
- RUN [ ${POSTGRESQL_TESTING} -eq 1 ] && TESTING="-testing" ; echo "deb https://download.postgresql.org/pub/repos/apt/ focal-pgdg${testing} ${POSTGRESQL_VER} main" >> /etc/apt/sources.list.d/pgdg.list
39
-
40
37
# Pass the output of date command as DATE argument if you want
41
38
# make sure that the image is generated using the lastest
42
39
# PostgreSQL packages (cache will be used for previous steps)
@@ -45,10 +42,13 @@ ARG DATE=None
45
42
# Add the PostgreSQL PGP key to verify their Debian packages and install them
46
43
# Key should be the same as https://www.postgresql.org/media/keys/ACCC4CF8.asc
47
44
# Then generate a list of original packages, upgrade and install PostgreSQL
48
- RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 && \
49
- dpkg --get-selections | grep 'install' | grep -v 'deinstall' |cut -f1 > /opt/packages-image.txt && \
45
+ RUN dpkg --get-selections | grep 'install' | grep -v 'deinstall' |cut -f1 > /opt/packages-image.txt && \
46
+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 && \
50
47
apt-get -qq -o=Dpkg::Use-Pty=0 update > /dev/null && \
48
+ LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get -qq -o=Dpkg::Use-Pty=0 -y install ca-certificates && \
51
49
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get -qq -o=Dpkg::Use-Pty=0 -y dist-upgrade > /dev/null && \
50
+ [ ${POSTGRESQL_TESTING} -eq 1 ] && TESTING="-testing" ; echo "deb https://download.postgresql.org/pub/repos/apt/ focal-pgdg${testing} ${POSTGRESQL_VER} main" >> /etc/apt/sources.list.d/pgdg.list && \
51
+ apt-get -qq -o=Dpkg::Use-Pty=0 update > /dev/null && \
52
52
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get -qq -o=Dpkg::Use-Pty=0 -y install \
53
53
postgresql-${POSTGRESQL_VER} \
54
54
postgresql-client-${POSTGRESQL_VER} \
0 commit comments