Skip to content

Commit adc86da

Browse files
author
Jalexchen
authored
Publish v16.0. [release] (CircleCI-Public#102)
1 parent 2f98800 commit adc86da

File tree

5 files changed

+150
-13
lines changed

5 files changed

+150
-13
lines changed

16.0/Dockerfile

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# vim:set ft=dockerfile:
2+
3+
# Do not edit individual Dockerfiles manually. Instead, please make changes to the Dockerfile.template, which will be used by the build script to generate Dockerfiles.
4+
5+
# By policy, the base image tag should be a quarterly tag unless there's a
6+
# specific reason to use a different one. This means January, April, July, or
7+
# October.
8+
9+
FROM cimg/base:2023.07
10+
11+
LABEL maintainer="Community & Partner Engineering Team <[email protected]>"
12+
13+
ENV PG_VER=16.0
14+
ENV PG_MAJOR=16
15+
ENV POSTGRES_HOST_AUTH_METHOD=trust
16+
ENV PATH /usr/lib/postgresql/$PG_MAJOR/bin:$PATH
17+
ENV PGDATA /var/lib/postgresql/data
18+
ENV POSTGRES_DB=circle_test
19+
ENV PGTAP_VERSION 1.2.0
20+
ENV PARTMAN_VERSION 4.7.2
21+
22+
USER root
23+
RUN BUILD_DEPS="clang \
24+
dirmngr \
25+
gnupg \
26+
libclang-dev \
27+
libicu-dev \
28+
libipc-run-perl \
29+
libkrb5-dev \
30+
libldap2-dev \
31+
liblz4-dev \
32+
libpam-dev \
33+
libperl-dev \
34+
libpython3-dev \
35+
libreadline-dev \
36+
libssl-dev \
37+
libxml2-dev \
38+
libxslt1-dev \
39+
llvm \
40+
llvm-dev \
41+
postgresql-server-dev-all \
42+
python3-dev \
43+
tcl-dev \
44+
uuid-dev" && \
45+
apt-get update && apt-get install -y --no-install-recommends \
46+
gosu \
47+
locales \
48+
$BUILD_DEPS \
49+
&& \
50+
rm -rf /var/lib/apt/lists/* && \
51+
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
52+
curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \
53+
cd postgresql-${PG_VER} && \
54+
./configure \
55+
--prefix=/usr/lib/postgresql/$PG_MAJOR \
56+
--enable-integer-datetimes \
57+
--enable-thread-safety \
58+
--enable-tap-tests \
59+
--with-uuid=e2fs \
60+
--with-gnu-ld \
61+
--with-pgport=5432 \
62+
--with-system-tzdata=/usr/share/zoneinfo \
63+
--with-includes=/usr/local/include \
64+
--with-libraries=/usr/local/lib \
65+
--with-krb5 \
66+
--with-gssapi \
67+
--with-ldap \
68+
--with-pam \
69+
--with-tcl \
70+
--with-perl \
71+
--with-python \
72+
--with-openssl \
73+
--with-libxml \
74+
--with-libxslt \
75+
--with-icu \
76+
--with-llvm \
77+
--with-lz4 \
78+
&& \
79+
# we can change from world to world-bin in newer releases
80+
make -j $(nproc) world && \
81+
make install-world && \
82+
cd .. && rm -rf postgresql-${PG_VER} \
83+
&& \
84+
git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \
85+
cd /pg_cron && make && PATH=$PATH make install && \
86+
rm -rf /pg_cron && \
87+
apt-get purge -y --auto-remove $BUILD_DEPS
88+
89+
RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \
90+
cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \
91+
cd .. && rm -rf pg_partman-${PARTMAN_VERSION}
92+
93+
# Install pgTAP & pg_prove utility.
94+
RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \
95+
cd /pgtap && make -j $(nproc) && make install && \
96+
curl -sL https://cpanmin.us | perl - App::cpanminus && \
97+
cpanm -n TAP::Parser::SourceHandler::pgTAP && \
98+
rm -rf /pgtap
99+
100+
RUN mkdir /docker-entrypoint-initdb.d
101+
102+
COPY pg_cron.sh /docker-entrypoint-initdb.d/
103+
COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf
104+
COPY docker-entrypoint.sh /usr/local/bin/
105+
106+
# Backwards compatibility
107+
RUN ln -s usr/local/bin/docker-entrypoint.sh /
108+
109+
RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \
110+
mkdir -p /var/lib/postgresql && \
111+
chown -R postgres:postgres /var/lib/postgresql && \
112+
chown -R postgres:postgres /etc/postgresql && \
113+
chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh
114+
115+
ENTRYPOINT ["docker-entrypoint.sh"]
116+
STOPSIGNAL SIGINT
117+
EXPOSE 5432
118+
CMD ["postgres"]

16.0/postgis/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# vim:set ft=dockerfile:
2+
3+
FROM cimg/postgres:16.0
4+
5+
LABEL maintainer="Community & Partner Engineering Team <[email protected]>"
6+
7+
ENV POSTGIS_VER=3.4.0
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
clang \
10+
libclang-dev \
11+
llvm \
12+
llvm-dev \
13+
libgdal-dev \
14+
libgeos-dev \
15+
libjson-c-dev \
16+
libmysqlclient-dev \
17+
libproj-dev \
18+
libprotobuf-c-dev \
19+
libxml2-dev \
20+
protobuf-c-compiler \
21+
&& \
22+
rm -rf /var/lib/apt/lists/* && \
23+
curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \
24+
cd postgis-${POSTGIS_VER} && \
25+
./configure && \
26+
make -j $(nproc) && \
27+
make install && \
28+
echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql

GEN-CHECK

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
GEN_CHECK=(15.4 14.9 13.12 12.16 11.21)
1+
GEN_CHECK=(16.0)

build-images.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,5 @@ set -eo pipefail
44

55
docker context create cimg
66
docker buildx create --use cimg
7-
docker buildx build --platform=linux/amd64,linux/arm64 --file 15.4/Dockerfile -t cimg/postgres:15.4 -t cimg/postgres:15.4 --push .
8-
docker buildx build --platform=linux/amd64,linux/arm64 --file 15.4/postgis/Dockerfile -t cimg/postgres:15.4-postgis -t cimg/postgres:15.4-postgis --push .
9-
docker buildx build --platform=linux/amd64,linux/arm64 --file 14.9/Dockerfile -t cimg/postgres:14.9 -t cimg/postgres:14.9 --push .
10-
docker buildx build --platform=linux/amd64,linux/arm64 --file 14.9/postgis/Dockerfile -t cimg/postgres:14.9-postgis -t cimg/postgres:14.9-postgis --push .
11-
docker buildx build --platform=linux/amd64,linux/arm64 --file 13.12/Dockerfile -t cimg/postgres:13.12 -t cimg/postgres:13.12 --push .
12-
docker buildx build --platform=linux/amd64,linux/arm64 --file 13.12/postgis/Dockerfile -t cimg/postgres:13.12-postgis -t cimg/postgres:13.12-postgis --push .
13-
docker buildx build --platform=linux/amd64,linux/arm64 --file 12.16/Dockerfile -t cimg/postgres:12.16 -t cimg/postgres:12.16 --push .
14-
docker buildx build --platform=linux/amd64,linux/arm64 --file 12.16/postgis/Dockerfile -t cimg/postgres:12.16-postgis -t cimg/postgres:12.16-postgis --push .
15-
docker buildx build --platform=linux/amd64,linux/arm64 --file 11.21/Dockerfile -t cimg/postgres:11.21 -t cimg/postgres:11.21 --push .
16-
docker buildx build --platform=linux/amd64,linux/arm64 --file 11.21/postgis/Dockerfile -t cimg/postgres:11.21-postgis -t cimg/postgres:11.21-postgis --push .
7+
docker buildx build --platform=linux/amd64,linux/arm64 --file 16.0/Dockerfile -t cimg/postgres:16.0 -t cimg/postgres:16.0 --push .
8+
docker buildx build --platform=linux/amd64,linux/arm64 --file 16.0/postgis/Dockerfile -t cimg/postgres:16.0-postgis -t cimg/postgres:16.0-postgis --push .

variants/postgis.Dockerfile.template

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM cimg/%%PARENT%%:%%PARENT_TAG%%
44

55
LABEL maintainer="Community & Partner Engineering Team <[email protected]>"
66

7-
ENV POSTGIS_VER=3.2.4
7+
ENV POSTGIS_VER=3.4.0
88
RUN apt-get update && apt-get install -y --no-install-recommends \
99
clang \
1010
libclang-dev \
@@ -26,4 +26,3 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2626
make -j $(nproc) && \
2727
make install && \
2828
echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql
29-

0 commit comments

Comments
 (0)