1
1
# syntax=docker/dockerfile:1.5-labs
2
+ ARG ubuntu_release=focal
2
3
ARG postgresql_major=15
3
4
ARG postgresql_release=${postgresql_major}.1
4
5
@@ -41,8 +42,9 @@ ARG wal_g_release=2.0.1
41
42
# ###################
42
43
# Setup Postgres PPA
43
44
# ###################
44
- FROM ubuntu:focal as ppa
45
+ FROM ubuntu:${ubuntu_release} as ppa
45
46
# Redeclare args for use in subsequent stages
47
+ ARG ubuntu_release
46
48
ARG postgresql_major
47
49
RUN apt-get update && apt-get install -y --no-install-recommends \
48
50
gnupg \
@@ -51,7 +53,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
51
53
# Add Postgres PPA
52
54
ARG postgresql_gpg_key=B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
53
55
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys "${postgresql_gpg_key}" && \
54
- echo "deb https://apt-archive.postgresql.org/pub/repos/apt focal -pgdg-archive main" > /etc/apt/sources.list.d/pgdg.list
56
+ echo "deb https://apt-archive.postgresql.org/pub/repos/apt ${ubuntu_release} -pgdg-archive main" > /etc/apt/sources.list.d/pgdg.list
55
57
56
58
# ###################
57
59
# Download pre-built postgres
@@ -75,9 +77,10 @@ RUN mv /var/cache/apt/archives/*.deb /tmp/
75
77
# ###################
76
78
# Install postgres
77
79
# ###################
78
- FROM ubuntu:focal as base
80
+ FROM ubuntu:${ubuntu_release} as base
79
81
# Redeclare args for use in subsequent stages
80
82
ARG TARGETARCH
83
+ ARG ubuntu_release
81
84
ARG postgresql_major
82
85
83
86
# Install postgres
@@ -691,7 +694,7 @@ FROM base as pgroonga
691
694
# Latest available is 3.0.3
692
695
ARG pgroonga_release
693
696
# Download pre-built packages
694
- ADD "https://packages.groonga.org/ubuntu/groonga-apt-source-latest-focal .deb" /tmp/source.deb
697
+ ADD "https://packages.groonga.org/ubuntu/groonga-apt-source-latest-${ubuntu_release} .deb" /tmp/source.deb
695
698
RUN apt-get update && apt-get install -y --no-install-recommends \
696
699
ca-certificates \
697
700
/tmp/source.deb \
@@ -854,7 +857,7 @@ COPY --from=supautils /tmp/*.deb /tmp/
854
857
# ###################
855
858
# Download gosu for easy step-down from root
856
859
# ###################
857
- FROM ubuntu:focal as gosu
860
+ FROM ubuntu:${ubuntu_release} as gosu
858
861
ARG TARGETARCH
859
862
# Install dependencies
860
863
RUN apt-get update && apt-get install -y --no-install-recommends \
0 commit comments