From 2b1cf41f239b5a0e66bdc4c8e5a3587432494e94 Mon Sep 17 00:00:00 2001 From: cpe-image-bot Date: Fri, 22 Nov 2024 03:09:59 +0000 Subject: [PATCH] Pub: 17.2,16.6,15.10,14.15, and more. [release] --- 12.22/Dockerfile | 120 +++++++++++++++++++++++++++++++++++++++ 12.22/postgis/Dockerfile | 29 ++++++++++ 13.18/Dockerfile | 120 +++++++++++++++++++++++++++++++++++++++ 13.18/postgis/Dockerfile | 29 ++++++++++ 14.14/Dockerfile | 120 +++++++++++++++++++++++++++++++++++++++ 14.14/postgis/Dockerfile | 29 ++++++++++ 14.15/Dockerfile | 120 +++++++++++++++++++++++++++++++++++++++ 14.15/postgis/Dockerfile | 29 ++++++++++ 15.10/Dockerfile | 120 +++++++++++++++++++++++++++++++++++++++ 15.10/postgis/Dockerfile | 29 ++++++++++ 15.9/Dockerfile | 120 +++++++++++++++++++++++++++++++++++++++ 15.9/postgis/Dockerfile | 29 ++++++++++ 16.5/Dockerfile | 120 +++++++++++++++++++++++++++++++++++++++ 16.5/postgis/Dockerfile | 29 ++++++++++ 16.6/Dockerfile | 120 +++++++++++++++++++++++++++++++++++++++ 16.6/postgis/Dockerfile | 29 ++++++++++ 17.1/Dockerfile | 119 ++++++++++++++++++++++++++++++++++++++ 17.1/postgis/Dockerfile | 29 ++++++++++ 17.2/Dockerfile | 119 ++++++++++++++++++++++++++++++++++++++ 17.2/postgis/Dockerfile | 29 ++++++++++ GEN-CHECK | 2 +- build-images.sh | 22 ++++++- 22 files changed, 1509 insertions(+), 3 deletions(-) create mode 100644 12.22/Dockerfile create mode 100644 12.22/postgis/Dockerfile create mode 100644 13.18/Dockerfile create mode 100644 13.18/postgis/Dockerfile create mode 100644 14.14/Dockerfile create mode 100644 14.14/postgis/Dockerfile create mode 100644 14.15/Dockerfile create mode 100644 14.15/postgis/Dockerfile create mode 100644 15.10/Dockerfile create mode 100644 15.10/postgis/Dockerfile create mode 100644 15.9/Dockerfile create mode 100644 15.9/postgis/Dockerfile create mode 100644 16.5/Dockerfile create mode 100644 16.5/postgis/Dockerfile create mode 100644 16.6/Dockerfile create mode 100644 16.6/postgis/Dockerfile create mode 100644 17.1/Dockerfile create mode 100644 17.1/postgis/Dockerfile create mode 100644 17.2/Dockerfile create mode 100644 17.2/postgis/Dockerfile diff --git a/12.22/Dockerfile b/12.22/Dockerfile new file mode 100644 index 0000000..4deeb0e --- /dev/null +++ b/12.22/Dockerfile @@ -0,0 +1,120 @@ +# vim:set ft=dockerfile: + +# 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. + +# By policy, the base image tag should be a quarterly tag unless there's a +# specific reason to use a different one. This means January, April, July, or +# October. + +FROM cimg/base:2024.02 + +LABEL maintainer="CircleCI Execution Team " + +ENV PG_VER=12.22 +ENV PG_MAJOR=12 +ENV POSTGRES_HOST_AUTH_METHOD=trust +ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH +ENV PGDATA=/var/lib/postgresql/data +ENV POSTGRES_DB=circle_test +ENV PGTAP_VERSION=1.2.0 +ENV PARTMAN_VERSION=4.7.2 + +USER root +RUN BUILD_DEPS="bison \ + clang \ + dirmngr \ + flex \ + gnupg \ + libclang-dev \ + libicu-dev \ + libipc-run-perl \ + libkrb5-dev \ + libldap2-dev \ + liblz4-dev \ + libpam-dev \ + libperl-dev \ + libpython3-dev \ + libreadline-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + llvm \ + llvm-dev \ + postgresql-server-dev-all \ + python3-dev \ + tcl-dev \ + uuid-dev" && \ + apt-get update && apt-get install -y --no-install-recommends \ + gosu \ + locales \ + $BUILD_DEPS \ + && \ + rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ + curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \ + cd postgresql-${PG_VER} && \ + ./configure \ + --prefix=/usr/lib/postgresql/$PG_MAJOR \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --enable-tap-tests \ + --with-uuid=e2fs \ + --with-gnu-ld \ + --with-pgport=5432 \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-includes=/usr/local/include \ + --with-libraries=/usr/local/lib \ + --with-krb5 \ + --with-gssapi \ + --with-ldap \ + --with-pam \ + --with-tcl \ + --with-perl \ + --with-python \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-llvm \ + --with-lz4 \ + && \ + # we can change from world to world-bin in newer releases + make -j $(nproc) world && \ + make install-world && \ + cd .. && rm -rf postgresql-${PG_VER} \ + && \ + git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \ + cd /pg_cron && make && PATH=$PATH make install && \ + rm -rf /pg_cron && \ + apt-get purge -y --auto-remove $BUILD_DEPS + +RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \ + cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \ + cd .. && rm -rf pg_partman-${PARTMAN_VERSION} + +# Install pgTAP & pg_prove utility. +RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \ + cd /pgtap && make -j $(nproc) && make install && \ + curl -sL https://cpanmin.us | perl - App::cpanminus && \ + cpanm -n TAP::Parser::SourceHandler::pgTAP && \ + rm -rf /pgtap + +RUN mkdir /docker-entrypoint-initdb.d + +COPY pg_cron.sh /docker-entrypoint-initdb.d/ +COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf +COPY docker-entrypoint.sh /usr/local/bin/ + +# Backwards compatibility +RUN ln -s usr/local/bin/docker-entrypoint.sh / + +RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql && \ + chown -R postgres:postgres /etc/postgresql && \ + chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] +STOPSIGNAL SIGINT +EXPOSE 5432 +CMD ["postgres"] diff --git a/12.22/postgis/Dockerfile b/12.22/postgis/Dockerfile new file mode 100644 index 0000000..035f315 --- /dev/null +++ b/12.22/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:12.22 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.5.0 +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang \ + g++ \ + libclang-dev \ + llvm \ + llvm-dev \ + libgdal-dev \ + libgeos-dev \ + libjson-c-dev \ + libmysqlclient-dev \ + libproj-dev \ + libprotobuf-c-dev \ + libxml2-dev \ + protobuf-c-compiler \ + && \ + rm -rf /var/lib/apt/lists/* && \ + curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \ + cd postgis-${POSTGIS_VER} && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql diff --git a/13.18/Dockerfile b/13.18/Dockerfile new file mode 100644 index 0000000..961352c --- /dev/null +++ b/13.18/Dockerfile @@ -0,0 +1,120 @@ +# vim:set ft=dockerfile: + +# 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. + +# By policy, the base image tag should be a quarterly tag unless there's a +# specific reason to use a different one. This means January, April, July, or +# October. + +FROM cimg/base:2024.02 + +LABEL maintainer="CircleCI Execution Team " + +ENV PG_VER=13.18 +ENV PG_MAJOR=13 +ENV POSTGRES_HOST_AUTH_METHOD=trust +ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH +ENV PGDATA=/var/lib/postgresql/data +ENV POSTGRES_DB=circle_test +ENV PGTAP_VERSION=1.2.0 +ENV PARTMAN_VERSION=4.7.2 + +USER root +RUN BUILD_DEPS="bison \ + clang \ + dirmngr \ + flex \ + gnupg \ + libclang-dev \ + libicu-dev \ + libipc-run-perl \ + libkrb5-dev \ + libldap2-dev \ + liblz4-dev \ + libpam-dev \ + libperl-dev \ + libpython3-dev \ + libreadline-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + llvm \ + llvm-dev \ + postgresql-server-dev-all \ + python3-dev \ + tcl-dev \ + uuid-dev" && \ + apt-get update && apt-get install -y --no-install-recommends \ + gosu \ + locales \ + $BUILD_DEPS \ + && \ + rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ + curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \ + cd postgresql-${PG_VER} && \ + ./configure \ + --prefix=/usr/lib/postgresql/$PG_MAJOR \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --enable-tap-tests \ + --with-uuid=e2fs \ + --with-gnu-ld \ + --with-pgport=5432 \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-includes=/usr/local/include \ + --with-libraries=/usr/local/lib \ + --with-krb5 \ + --with-gssapi \ + --with-ldap \ + --with-pam \ + --with-tcl \ + --with-perl \ + --with-python \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-llvm \ + --with-lz4 \ + && \ + # we can change from world to world-bin in newer releases + make -j $(nproc) world && \ + make install-world && \ + cd .. && rm -rf postgresql-${PG_VER} \ + && \ + git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \ + cd /pg_cron && make && PATH=$PATH make install && \ + rm -rf /pg_cron && \ + apt-get purge -y --auto-remove $BUILD_DEPS + +RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \ + cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \ + cd .. && rm -rf pg_partman-${PARTMAN_VERSION} + +# Install pgTAP & pg_prove utility. +RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \ + cd /pgtap && make -j $(nproc) && make install && \ + curl -sL https://cpanmin.us | perl - App::cpanminus && \ + cpanm -n TAP::Parser::SourceHandler::pgTAP && \ + rm -rf /pgtap + +RUN mkdir /docker-entrypoint-initdb.d + +COPY pg_cron.sh /docker-entrypoint-initdb.d/ +COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf +COPY docker-entrypoint.sh /usr/local/bin/ + +# Backwards compatibility +RUN ln -s usr/local/bin/docker-entrypoint.sh / + +RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql && \ + chown -R postgres:postgres /etc/postgresql && \ + chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] +STOPSIGNAL SIGINT +EXPOSE 5432 +CMD ["postgres"] diff --git a/13.18/postgis/Dockerfile b/13.18/postgis/Dockerfile new file mode 100644 index 0000000..57ef648 --- /dev/null +++ b/13.18/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:13.18 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.5.0 +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang \ + g++ \ + libclang-dev \ + llvm \ + llvm-dev \ + libgdal-dev \ + libgeos-dev \ + libjson-c-dev \ + libmysqlclient-dev \ + libproj-dev \ + libprotobuf-c-dev \ + libxml2-dev \ + protobuf-c-compiler \ + && \ + rm -rf /var/lib/apt/lists/* && \ + curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \ + cd postgis-${POSTGIS_VER} && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql diff --git a/14.14/Dockerfile b/14.14/Dockerfile new file mode 100644 index 0000000..d299973 --- /dev/null +++ b/14.14/Dockerfile @@ -0,0 +1,120 @@ +# vim:set ft=dockerfile: + +# 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. + +# By policy, the base image tag should be a quarterly tag unless there's a +# specific reason to use a different one. This means January, April, July, or +# October. + +FROM cimg/base:2024.02 + +LABEL maintainer="CircleCI Execution Team " + +ENV PG_VER=14.14 +ENV PG_MAJOR=14 +ENV POSTGRES_HOST_AUTH_METHOD=trust +ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH +ENV PGDATA=/var/lib/postgresql/data +ENV POSTGRES_DB=circle_test +ENV PGTAP_VERSION=1.2.0 +ENV PARTMAN_VERSION=4.7.2 + +USER root +RUN BUILD_DEPS="bison \ + clang \ + dirmngr \ + flex \ + gnupg \ + libclang-dev \ + libicu-dev \ + libipc-run-perl \ + libkrb5-dev \ + libldap2-dev \ + liblz4-dev \ + libpam-dev \ + libperl-dev \ + libpython3-dev \ + libreadline-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + llvm \ + llvm-dev \ + postgresql-server-dev-all \ + python3-dev \ + tcl-dev \ + uuid-dev" && \ + apt-get update && apt-get install -y --no-install-recommends \ + gosu \ + locales \ + $BUILD_DEPS \ + && \ + rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ + curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \ + cd postgresql-${PG_VER} && \ + ./configure \ + --prefix=/usr/lib/postgresql/$PG_MAJOR \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --enable-tap-tests \ + --with-uuid=e2fs \ + --with-gnu-ld \ + --with-pgport=5432 \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-includes=/usr/local/include \ + --with-libraries=/usr/local/lib \ + --with-krb5 \ + --with-gssapi \ + --with-ldap \ + --with-pam \ + --with-tcl \ + --with-perl \ + --with-python \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-llvm \ + --with-lz4 \ + && \ + # we can change from world to world-bin in newer releases + make -j $(nproc) world && \ + make install-world && \ + cd .. && rm -rf postgresql-${PG_VER} \ + && \ + git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \ + cd /pg_cron && make && PATH=$PATH make install && \ + rm -rf /pg_cron && \ + apt-get purge -y --auto-remove $BUILD_DEPS + +RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \ + cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \ + cd .. && rm -rf pg_partman-${PARTMAN_VERSION} + +# Install pgTAP & pg_prove utility. +RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \ + cd /pgtap && make -j $(nproc) && make install && \ + curl -sL https://cpanmin.us | perl - App::cpanminus && \ + cpanm -n TAP::Parser::SourceHandler::pgTAP && \ + rm -rf /pgtap + +RUN mkdir /docker-entrypoint-initdb.d + +COPY pg_cron.sh /docker-entrypoint-initdb.d/ +COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf +COPY docker-entrypoint.sh /usr/local/bin/ + +# Backwards compatibility +RUN ln -s usr/local/bin/docker-entrypoint.sh / + +RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql && \ + chown -R postgres:postgres /etc/postgresql && \ + chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] +STOPSIGNAL SIGINT +EXPOSE 5432 +CMD ["postgres"] diff --git a/14.14/postgis/Dockerfile b/14.14/postgis/Dockerfile new file mode 100644 index 0000000..277a268 --- /dev/null +++ b/14.14/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:14.14 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.5.0 +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang \ + g++ \ + libclang-dev \ + llvm \ + llvm-dev \ + libgdal-dev \ + libgeos-dev \ + libjson-c-dev \ + libmysqlclient-dev \ + libproj-dev \ + libprotobuf-c-dev \ + libxml2-dev \ + protobuf-c-compiler \ + && \ + rm -rf /var/lib/apt/lists/* && \ + curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \ + cd postgis-${POSTGIS_VER} && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql diff --git a/14.15/Dockerfile b/14.15/Dockerfile new file mode 100644 index 0000000..5b2859c --- /dev/null +++ b/14.15/Dockerfile @@ -0,0 +1,120 @@ +# vim:set ft=dockerfile: + +# 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. + +# By policy, the base image tag should be a quarterly tag unless there's a +# specific reason to use a different one. This means January, April, July, or +# October. + +FROM cimg/base:2024.02 + +LABEL maintainer="CircleCI Execution Team " + +ENV PG_VER=14.15 +ENV PG_MAJOR=14 +ENV POSTGRES_HOST_AUTH_METHOD=trust +ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH +ENV PGDATA=/var/lib/postgresql/data +ENV POSTGRES_DB=circle_test +ENV PGTAP_VERSION=1.2.0 +ENV PARTMAN_VERSION=4.7.2 + +USER root +RUN BUILD_DEPS="bison \ + clang \ + dirmngr \ + flex \ + gnupg \ + libclang-dev \ + libicu-dev \ + libipc-run-perl \ + libkrb5-dev \ + libldap2-dev \ + liblz4-dev \ + libpam-dev \ + libperl-dev \ + libpython3-dev \ + libreadline-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + llvm \ + llvm-dev \ + postgresql-server-dev-all \ + python3-dev \ + tcl-dev \ + uuid-dev" && \ + apt-get update && apt-get install -y --no-install-recommends \ + gosu \ + locales \ + $BUILD_DEPS \ + && \ + rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ + curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \ + cd postgresql-${PG_VER} && \ + ./configure \ + --prefix=/usr/lib/postgresql/$PG_MAJOR \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --enable-tap-tests \ + --with-uuid=e2fs \ + --with-gnu-ld \ + --with-pgport=5432 \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-includes=/usr/local/include \ + --with-libraries=/usr/local/lib \ + --with-krb5 \ + --with-gssapi \ + --with-ldap \ + --with-pam \ + --with-tcl \ + --with-perl \ + --with-python \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-llvm \ + --with-lz4 \ + && \ + # we can change from world to world-bin in newer releases + make -j $(nproc) world && \ + make install-world && \ + cd .. && rm -rf postgresql-${PG_VER} \ + && \ + git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \ + cd /pg_cron && make && PATH=$PATH make install && \ + rm -rf /pg_cron && \ + apt-get purge -y --auto-remove $BUILD_DEPS + +RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \ + cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \ + cd .. && rm -rf pg_partman-${PARTMAN_VERSION} + +# Install pgTAP & pg_prove utility. +RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \ + cd /pgtap && make -j $(nproc) && make install && \ + curl -sL https://cpanmin.us | perl - App::cpanminus && \ + cpanm -n TAP::Parser::SourceHandler::pgTAP && \ + rm -rf /pgtap + +RUN mkdir /docker-entrypoint-initdb.d + +COPY pg_cron.sh /docker-entrypoint-initdb.d/ +COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf +COPY docker-entrypoint.sh /usr/local/bin/ + +# Backwards compatibility +RUN ln -s usr/local/bin/docker-entrypoint.sh / + +RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql && \ + chown -R postgres:postgres /etc/postgresql && \ + chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] +STOPSIGNAL SIGINT +EXPOSE 5432 +CMD ["postgres"] diff --git a/14.15/postgis/Dockerfile b/14.15/postgis/Dockerfile new file mode 100644 index 0000000..a3d1a94 --- /dev/null +++ b/14.15/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:14.15 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.5.0 +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang \ + g++ \ + libclang-dev \ + llvm \ + llvm-dev \ + libgdal-dev \ + libgeos-dev \ + libjson-c-dev \ + libmysqlclient-dev \ + libproj-dev \ + libprotobuf-c-dev \ + libxml2-dev \ + protobuf-c-compiler \ + && \ + rm -rf /var/lib/apt/lists/* && \ + curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \ + cd postgis-${POSTGIS_VER} && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql diff --git a/15.10/Dockerfile b/15.10/Dockerfile new file mode 100644 index 0000000..bb7aad7 --- /dev/null +++ b/15.10/Dockerfile @@ -0,0 +1,120 @@ +# vim:set ft=dockerfile: + +# 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. + +# By policy, the base image tag should be a quarterly tag unless there's a +# specific reason to use a different one. This means January, April, July, or +# October. + +FROM cimg/base:2024.02 + +LABEL maintainer="CircleCI Execution Team " + +ENV PG_VER=15.10 +ENV PG_MAJOR=15 +ENV POSTGRES_HOST_AUTH_METHOD=trust +ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH +ENV PGDATA=/var/lib/postgresql/data +ENV POSTGRES_DB=circle_test +ENV PGTAP_VERSION=1.2.0 +ENV PARTMAN_VERSION=4.7.2 + +USER root +RUN BUILD_DEPS="bison \ + clang \ + dirmngr \ + flex \ + gnupg \ + libclang-dev \ + libicu-dev \ + libipc-run-perl \ + libkrb5-dev \ + libldap2-dev \ + liblz4-dev \ + libpam-dev \ + libperl-dev \ + libpython3-dev \ + libreadline-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + llvm \ + llvm-dev \ + postgresql-server-dev-all \ + python3-dev \ + tcl-dev \ + uuid-dev" && \ + apt-get update && apt-get install -y --no-install-recommends \ + gosu \ + locales \ + $BUILD_DEPS \ + && \ + rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ + curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \ + cd postgresql-${PG_VER} && \ + ./configure \ + --prefix=/usr/lib/postgresql/$PG_MAJOR \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --enable-tap-tests \ + --with-uuid=e2fs \ + --with-gnu-ld \ + --with-pgport=5432 \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-includes=/usr/local/include \ + --with-libraries=/usr/local/lib \ + --with-krb5 \ + --with-gssapi \ + --with-ldap \ + --with-pam \ + --with-tcl \ + --with-perl \ + --with-python \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-llvm \ + --with-lz4 \ + && \ + # we can change from world to world-bin in newer releases + make -j $(nproc) world && \ + make install-world && \ + cd .. && rm -rf postgresql-${PG_VER} \ + && \ + git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \ + cd /pg_cron && make && PATH=$PATH make install && \ + rm -rf /pg_cron && \ + apt-get purge -y --auto-remove $BUILD_DEPS + +RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \ + cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \ + cd .. && rm -rf pg_partman-${PARTMAN_VERSION} + +# Install pgTAP & pg_prove utility. +RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \ + cd /pgtap && make -j $(nproc) && make install && \ + curl -sL https://cpanmin.us | perl - App::cpanminus && \ + cpanm -n TAP::Parser::SourceHandler::pgTAP && \ + rm -rf /pgtap + +RUN mkdir /docker-entrypoint-initdb.d + +COPY pg_cron.sh /docker-entrypoint-initdb.d/ +COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf +COPY docker-entrypoint.sh /usr/local/bin/ + +# Backwards compatibility +RUN ln -s usr/local/bin/docker-entrypoint.sh / + +RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql && \ + chown -R postgres:postgres /etc/postgresql && \ + chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] +STOPSIGNAL SIGINT +EXPOSE 5432 +CMD ["postgres"] diff --git a/15.10/postgis/Dockerfile b/15.10/postgis/Dockerfile new file mode 100644 index 0000000..eb8ac72 --- /dev/null +++ b/15.10/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:15.10 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.5.0 +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang \ + g++ \ + libclang-dev \ + llvm \ + llvm-dev \ + libgdal-dev \ + libgeos-dev \ + libjson-c-dev \ + libmysqlclient-dev \ + libproj-dev \ + libprotobuf-c-dev \ + libxml2-dev \ + protobuf-c-compiler \ + && \ + rm -rf /var/lib/apt/lists/* && \ + curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \ + cd postgis-${POSTGIS_VER} && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql diff --git a/15.9/Dockerfile b/15.9/Dockerfile new file mode 100644 index 0000000..aec5a76 --- /dev/null +++ b/15.9/Dockerfile @@ -0,0 +1,120 @@ +# vim:set ft=dockerfile: + +# 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. + +# By policy, the base image tag should be a quarterly tag unless there's a +# specific reason to use a different one. This means January, April, July, or +# October. + +FROM cimg/base:2024.02 + +LABEL maintainer="CircleCI Execution Team " + +ENV PG_VER=15.9 +ENV PG_MAJOR=15 +ENV POSTGRES_HOST_AUTH_METHOD=trust +ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH +ENV PGDATA=/var/lib/postgresql/data +ENV POSTGRES_DB=circle_test +ENV PGTAP_VERSION=1.2.0 +ENV PARTMAN_VERSION=4.7.2 + +USER root +RUN BUILD_DEPS="bison \ + clang \ + dirmngr \ + flex \ + gnupg \ + libclang-dev \ + libicu-dev \ + libipc-run-perl \ + libkrb5-dev \ + libldap2-dev \ + liblz4-dev \ + libpam-dev \ + libperl-dev \ + libpython3-dev \ + libreadline-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + llvm \ + llvm-dev \ + postgresql-server-dev-all \ + python3-dev \ + tcl-dev \ + uuid-dev" && \ + apt-get update && apt-get install -y --no-install-recommends \ + gosu \ + locales \ + $BUILD_DEPS \ + && \ + rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ + curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \ + cd postgresql-${PG_VER} && \ + ./configure \ + --prefix=/usr/lib/postgresql/$PG_MAJOR \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --enable-tap-tests \ + --with-uuid=e2fs \ + --with-gnu-ld \ + --with-pgport=5432 \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-includes=/usr/local/include \ + --with-libraries=/usr/local/lib \ + --with-krb5 \ + --with-gssapi \ + --with-ldap \ + --with-pam \ + --with-tcl \ + --with-perl \ + --with-python \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-llvm \ + --with-lz4 \ + && \ + # we can change from world to world-bin in newer releases + make -j $(nproc) world && \ + make install-world && \ + cd .. && rm -rf postgresql-${PG_VER} \ + && \ + git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \ + cd /pg_cron && make && PATH=$PATH make install && \ + rm -rf /pg_cron && \ + apt-get purge -y --auto-remove $BUILD_DEPS + +RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \ + cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \ + cd .. && rm -rf pg_partman-${PARTMAN_VERSION} + +# Install pgTAP & pg_prove utility. +RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \ + cd /pgtap && make -j $(nproc) && make install && \ + curl -sL https://cpanmin.us | perl - App::cpanminus && \ + cpanm -n TAP::Parser::SourceHandler::pgTAP && \ + rm -rf /pgtap + +RUN mkdir /docker-entrypoint-initdb.d + +COPY pg_cron.sh /docker-entrypoint-initdb.d/ +COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf +COPY docker-entrypoint.sh /usr/local/bin/ + +# Backwards compatibility +RUN ln -s usr/local/bin/docker-entrypoint.sh / + +RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql && \ + chown -R postgres:postgres /etc/postgresql && \ + chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] +STOPSIGNAL SIGINT +EXPOSE 5432 +CMD ["postgres"] diff --git a/15.9/postgis/Dockerfile b/15.9/postgis/Dockerfile new file mode 100644 index 0000000..00835a8 --- /dev/null +++ b/15.9/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:15.9 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.5.0 +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang \ + g++ \ + libclang-dev \ + llvm \ + llvm-dev \ + libgdal-dev \ + libgeos-dev \ + libjson-c-dev \ + libmysqlclient-dev \ + libproj-dev \ + libprotobuf-c-dev \ + libxml2-dev \ + protobuf-c-compiler \ + && \ + rm -rf /var/lib/apt/lists/* && \ + curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \ + cd postgis-${POSTGIS_VER} && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql diff --git a/16.5/Dockerfile b/16.5/Dockerfile new file mode 100644 index 0000000..2acadff --- /dev/null +++ b/16.5/Dockerfile @@ -0,0 +1,120 @@ +# vim:set ft=dockerfile: + +# 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. + +# By policy, the base image tag should be a quarterly tag unless there's a +# specific reason to use a different one. This means January, April, July, or +# October. + +FROM cimg/base:2024.02 + +LABEL maintainer="CircleCI Execution Team " + +ENV PG_VER=16.5 +ENV PG_MAJOR=16 +ENV POSTGRES_HOST_AUTH_METHOD=trust +ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH +ENV PGDATA=/var/lib/postgresql/data +ENV POSTGRES_DB=circle_test +ENV PGTAP_VERSION=1.2.0 +ENV PARTMAN_VERSION=4.7.2 + +USER root +RUN BUILD_DEPS="bison \ + clang \ + dirmngr \ + flex \ + gnupg \ + libclang-dev \ + libicu-dev \ + libipc-run-perl \ + libkrb5-dev \ + libldap2-dev \ + liblz4-dev \ + libpam-dev \ + libperl-dev \ + libpython3-dev \ + libreadline-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + llvm \ + llvm-dev \ + postgresql-server-dev-all \ + python3-dev \ + tcl-dev \ + uuid-dev" && \ + apt-get update && apt-get install -y --no-install-recommends \ + gosu \ + locales \ + $BUILD_DEPS \ + && \ + rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ + curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \ + cd postgresql-${PG_VER} && \ + ./configure \ + --prefix=/usr/lib/postgresql/$PG_MAJOR \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --enable-tap-tests \ + --with-uuid=e2fs \ + --with-gnu-ld \ + --with-pgport=5432 \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-includes=/usr/local/include \ + --with-libraries=/usr/local/lib \ + --with-krb5 \ + --with-gssapi \ + --with-ldap \ + --with-pam \ + --with-tcl \ + --with-perl \ + --with-python \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-llvm \ + --with-lz4 \ + && \ + # we can change from world to world-bin in newer releases + make -j $(nproc) world && \ + make install-world && \ + cd .. && rm -rf postgresql-${PG_VER} \ + && \ + git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \ + cd /pg_cron && make && PATH=$PATH make install && \ + rm -rf /pg_cron && \ + apt-get purge -y --auto-remove $BUILD_DEPS + +RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \ + cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \ + cd .. && rm -rf pg_partman-${PARTMAN_VERSION} + +# Install pgTAP & pg_prove utility. +RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \ + cd /pgtap && make -j $(nproc) && make install && \ + curl -sL https://cpanmin.us | perl - App::cpanminus && \ + cpanm -n TAP::Parser::SourceHandler::pgTAP && \ + rm -rf /pgtap + +RUN mkdir /docker-entrypoint-initdb.d + +COPY pg_cron.sh /docker-entrypoint-initdb.d/ +COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf +COPY docker-entrypoint.sh /usr/local/bin/ + +# Backwards compatibility +RUN ln -s usr/local/bin/docker-entrypoint.sh / + +RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql && \ + chown -R postgres:postgres /etc/postgresql && \ + chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] +STOPSIGNAL SIGINT +EXPOSE 5432 +CMD ["postgres"] diff --git a/16.5/postgis/Dockerfile b/16.5/postgis/Dockerfile new file mode 100644 index 0000000..05f39bc --- /dev/null +++ b/16.5/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:16.5 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.5.0 +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang \ + g++ \ + libclang-dev \ + llvm \ + llvm-dev \ + libgdal-dev \ + libgeos-dev \ + libjson-c-dev \ + libmysqlclient-dev \ + libproj-dev \ + libprotobuf-c-dev \ + libxml2-dev \ + protobuf-c-compiler \ + && \ + rm -rf /var/lib/apt/lists/* && \ + curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \ + cd postgis-${POSTGIS_VER} && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql diff --git a/16.6/Dockerfile b/16.6/Dockerfile new file mode 100644 index 0000000..154d784 --- /dev/null +++ b/16.6/Dockerfile @@ -0,0 +1,120 @@ +# vim:set ft=dockerfile: + +# 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. + +# By policy, the base image tag should be a quarterly tag unless there's a +# specific reason to use a different one. This means January, April, July, or +# October. + +FROM cimg/base:2024.02 + +LABEL maintainer="CircleCI Execution Team " + +ENV PG_VER=16.6 +ENV PG_MAJOR=16 +ENV POSTGRES_HOST_AUTH_METHOD=trust +ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH +ENV PGDATA=/var/lib/postgresql/data +ENV POSTGRES_DB=circle_test +ENV PGTAP_VERSION=1.2.0 +ENV PARTMAN_VERSION=4.7.2 + +USER root +RUN BUILD_DEPS="bison \ + clang \ + dirmngr \ + flex \ + gnupg \ + libclang-dev \ + libicu-dev \ + libipc-run-perl \ + libkrb5-dev \ + libldap2-dev \ + liblz4-dev \ + libpam-dev \ + libperl-dev \ + libpython3-dev \ + libreadline-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + llvm \ + llvm-dev \ + postgresql-server-dev-all \ + python3-dev \ + tcl-dev \ + uuid-dev" && \ + apt-get update && apt-get install -y --no-install-recommends \ + gosu \ + locales \ + $BUILD_DEPS \ + && \ + rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ + curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \ + cd postgresql-${PG_VER} && \ + ./configure \ + --prefix=/usr/lib/postgresql/$PG_MAJOR \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --enable-tap-tests \ + --with-uuid=e2fs \ + --with-gnu-ld \ + --with-pgport=5432 \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-includes=/usr/local/include \ + --with-libraries=/usr/local/lib \ + --with-krb5 \ + --with-gssapi \ + --with-ldap \ + --with-pam \ + --with-tcl \ + --with-perl \ + --with-python \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-llvm \ + --with-lz4 \ + && \ + # we can change from world to world-bin in newer releases + make -j $(nproc) world && \ + make install-world && \ + cd .. && rm -rf postgresql-${PG_VER} \ + && \ + git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \ + cd /pg_cron && make && PATH=$PATH make install && \ + rm -rf /pg_cron && \ + apt-get purge -y --auto-remove $BUILD_DEPS + +RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \ + cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \ + cd .. && rm -rf pg_partman-${PARTMAN_VERSION} + +# Install pgTAP & pg_prove utility. +RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \ + cd /pgtap && make -j $(nproc) && make install && \ + curl -sL https://cpanmin.us | perl - App::cpanminus && \ + cpanm -n TAP::Parser::SourceHandler::pgTAP && \ + rm -rf /pgtap + +RUN mkdir /docker-entrypoint-initdb.d + +COPY pg_cron.sh /docker-entrypoint-initdb.d/ +COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf +COPY docker-entrypoint.sh /usr/local/bin/ + +# Backwards compatibility +RUN ln -s usr/local/bin/docker-entrypoint.sh / + +RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql && \ + chown -R postgres:postgres /etc/postgresql && \ + chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] +STOPSIGNAL SIGINT +EXPOSE 5432 +CMD ["postgres"] diff --git a/16.6/postgis/Dockerfile b/16.6/postgis/Dockerfile new file mode 100644 index 0000000..f09e140 --- /dev/null +++ b/16.6/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:16.6 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.5.0 +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang \ + g++ \ + libclang-dev \ + llvm \ + llvm-dev \ + libgdal-dev \ + libgeos-dev \ + libjson-c-dev \ + libmysqlclient-dev \ + libproj-dev \ + libprotobuf-c-dev \ + libxml2-dev \ + protobuf-c-compiler \ + && \ + rm -rf /var/lib/apt/lists/* && \ + curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \ + cd postgis-${POSTGIS_VER} && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql diff --git a/17.1/Dockerfile b/17.1/Dockerfile new file mode 100644 index 0000000..3956dc9 --- /dev/null +++ b/17.1/Dockerfile @@ -0,0 +1,119 @@ +# vim:set ft=dockerfile: + +# 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. + +# By policy, the base image tag should be a quarterly tag unless there's a +# specific reason to use a different one. This means January, April, July, or +# October. + +FROM cimg/base:2024.02 + +LABEL maintainer="CircleCI Execution Team " + +ENV PG_VER=17.1 +ENV PG_MAJOR=17 +ENV POSTGRES_HOST_AUTH_METHOD=trust +ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH +ENV PGDATA=/var/lib/postgresql/data +ENV POSTGRES_DB=circle_test +ENV PGTAP_VERSION=1.2.0 +ENV PARTMAN_VERSION=4.7.2 + +USER root +RUN BUILD_DEPS="bison \ + clang \ + dirmngr \ + flex \ + gnupg \ + libclang-dev \ + libicu-dev \ + libipc-run-perl \ + libkrb5-dev \ + libldap2-dev \ + liblz4-dev \ + libpam-dev \ + libperl-dev \ + libpython3-dev \ + libreadline-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + llvm \ + llvm-dev \ + postgresql-server-dev-all \ + python3-dev \ + tcl-dev \ + uuid-dev" && \ + apt-get update && apt-get install -y --no-install-recommends \ + gosu \ + locales \ + $BUILD_DEPS \ + && \ + rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ + curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \ + cd postgresql-${PG_VER} && \ + ./configure \ + --prefix=/usr/lib/postgresql/$PG_MAJOR \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --with-uuid=e2fs \ + --with-gnu-ld \ + --with-pgport=5432 \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-includes=/usr/local/include \ + --with-libraries=/usr/local/lib \ + --with-krb5 \ + --with-gssapi \ + --with-ldap \ + --with-pam \ + --with-tcl \ + --with-perl \ + --with-python \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-llvm \ + --with-lz4 \ + && \ + # we can change from world to world-bin in newer releases + make -j $(nproc) world && \ + make install-world && \ + cd .. && rm -rf postgresql-${PG_VER} \ + && \ + git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \ + cd /pg_cron && make && PATH=$PATH make install && \ + rm -rf /pg_cron && \ + apt-get purge -y --auto-remove $BUILD_DEPS + +RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \ + cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \ + cd .. && rm -rf pg_partman-${PARTMAN_VERSION} + +# Install pgTAP & pg_prove utility. +RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \ + cd /pgtap && make -j $(nproc) && make install && \ + curl -sL https://cpanmin.us | perl - App::cpanminus && \ + cpanm -n TAP::Parser::SourceHandler::pgTAP && \ + rm -rf /pgtap + +RUN mkdir /docker-entrypoint-initdb.d + +COPY pg_cron.sh /docker-entrypoint-initdb.d/ +COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf +COPY docker-entrypoint.sh /usr/local/bin/ + +# Backwards compatibility +RUN ln -s usr/local/bin/docker-entrypoint.sh / + +RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql && \ + chown -R postgres:postgres /etc/postgresql && \ + chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] +STOPSIGNAL SIGINT +EXPOSE 5432 +CMD ["postgres"] diff --git a/17.1/postgis/Dockerfile b/17.1/postgis/Dockerfile new file mode 100644 index 0000000..3d91ebf --- /dev/null +++ b/17.1/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:17.1 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.5.0 +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang \ + g++ \ + libclang-dev \ + llvm \ + llvm-dev \ + libgdal-dev \ + libgeos-dev \ + libjson-c-dev \ + libmysqlclient-dev \ + libproj-dev \ + libprotobuf-c-dev \ + libxml2-dev \ + protobuf-c-compiler \ + && \ + rm -rf /var/lib/apt/lists/* && \ + curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \ + cd postgis-${POSTGIS_VER} && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql diff --git a/17.2/Dockerfile b/17.2/Dockerfile new file mode 100644 index 0000000..dd02404 --- /dev/null +++ b/17.2/Dockerfile @@ -0,0 +1,119 @@ +# vim:set ft=dockerfile: + +# 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. + +# By policy, the base image tag should be a quarterly tag unless there's a +# specific reason to use a different one. This means January, April, July, or +# October. + +FROM cimg/base:2024.02 + +LABEL maintainer="CircleCI Execution Team " + +ENV PG_VER=17.2 +ENV PG_MAJOR=17 +ENV POSTGRES_HOST_AUTH_METHOD=trust +ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH +ENV PGDATA=/var/lib/postgresql/data +ENV POSTGRES_DB=circle_test +ENV PGTAP_VERSION=1.2.0 +ENV PARTMAN_VERSION=4.7.2 + +USER root +RUN BUILD_DEPS="bison \ + clang \ + dirmngr \ + flex \ + gnupg \ + libclang-dev \ + libicu-dev \ + libipc-run-perl \ + libkrb5-dev \ + libldap2-dev \ + liblz4-dev \ + libpam-dev \ + libperl-dev \ + libpython3-dev \ + libreadline-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + llvm \ + llvm-dev \ + postgresql-server-dev-all \ + python3-dev \ + tcl-dev \ + uuid-dev" && \ + apt-get update && apt-get install -y --no-install-recommends \ + gosu \ + locales \ + $BUILD_DEPS \ + && \ + rm -rf /var/lib/apt/lists/* && \ + localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ + curl -sSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz" | tar -xz && \ + cd postgresql-${PG_VER} && \ + ./configure \ + --prefix=/usr/lib/postgresql/$PG_MAJOR \ + --enable-integer-datetimes \ + --enable-thread-safety \ + --with-uuid=e2fs \ + --with-gnu-ld \ + --with-pgport=5432 \ + --with-system-tzdata=/usr/share/zoneinfo \ + --with-includes=/usr/local/include \ + --with-libraries=/usr/local/lib \ + --with-krb5 \ + --with-gssapi \ + --with-ldap \ + --with-pam \ + --with-tcl \ + --with-perl \ + --with-python \ + --with-openssl \ + --with-libxml \ + --with-libxslt \ + --with-icu \ + --with-llvm \ + --with-lz4 \ + && \ + # we can change from world to world-bin in newer releases + make -j $(nproc) world && \ + make install-world && \ + cd .. && rm -rf postgresql-${PG_VER} \ + && \ + git clone --depth 1 https://github.com/citusdata/pg_cron.git /pg_cron && \ + cd /pg_cron && make && PATH=$PATH make install && \ + rm -rf /pg_cron && \ + apt-get purge -y --auto-remove $BUILD_DEPS + +RUN curl -sSL "https://github.com/pgpartman/pg_partman/archive/v${PARTMAN_VERSION}.tar.gz" | tar -xz && \ + cd pg_partman-${PARTMAN_VERSION} && make NO_BGW=1 install && \ + cd .. && rm -rf pg_partman-${PARTMAN_VERSION} + +# Install pgTAP & pg_prove utility. +RUN git clone --depth 1 -b "v$PGTAP_VERSION" https://github.com/theory/pgtap.git /pgtap && \ + cd /pgtap && make -j $(nproc) && make install && \ + curl -sL https://cpanmin.us | perl - App::cpanminus && \ + cpanm -n TAP::Parser::SourceHandler::pgTAP && \ + rm -rf /pgtap + +RUN mkdir /docker-entrypoint-initdb.d + +COPY pg_cron.sh /docker-entrypoint-initdb.d/ +COPY custom-postgresql.conf /etc/postgresql/custom-postgresql.conf +COPY docker-entrypoint.sh /usr/local/bin/ + +# Backwards compatibility +RUN ln -s usr/local/bin/docker-entrypoint.sh / + +RUN chmod +x /usr/local/bin/docker-entrypoint.sh /docker-entrypoint-initdb.d/pg_cron.sh && \ + mkdir -p /var/lib/postgresql && \ + chown -R postgres:postgres /var/lib/postgresql && \ + chown -R postgres:postgres /etc/postgresql && \ + chown -R postgres:postgres /usr/local/bin/docker-entrypoint.sh + +ENTRYPOINT ["docker-entrypoint.sh"] +STOPSIGNAL SIGINT +EXPOSE 5432 +CMD ["postgres"] diff --git a/17.2/postgis/Dockerfile b/17.2/postgis/Dockerfile new file mode 100644 index 0000000..b6d5e85 --- /dev/null +++ b/17.2/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:17.2 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.5.0 +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang \ + g++ \ + libclang-dev \ + llvm \ + llvm-dev \ + libgdal-dev \ + libgeos-dev \ + libjson-c-dev \ + libmysqlclient-dev \ + libproj-dev \ + libprotobuf-c-dev \ + libxml2-dev \ + protobuf-c-compiler \ + && \ + rm -rf /var/lib/apt/lists/* && \ + curl -sSL "https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VER}.tar.gz" | tar -xz && \ + cd postgis-${POSTGIS_VER} && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + echo "CREATE EXTENSION postgis;" > /docker-entrypoint-initdb.d/postgis.sql diff --git a/GEN-CHECK b/GEN-CHECK index 83cf02a..7a92eb1 100644 --- a/GEN-CHECK +++ b/GEN-CHECK @@ -1 +1 @@ -GEN_CHECK=(17.0) +GEN_CHECK=(17.2 16.6 15.10 14.15 13.18 12.22 17.1 16.5 15.9 14.14) diff --git a/build-images.sh b/build-images.sh index 99f5c9a..6979279 100755 --- a/build-images.sh +++ b/build-images.sh @@ -4,5 +4,23 @@ set -eo pipefail docker context create cimg docker buildx create --use cimg -docker buildx build --platform=linux/amd64,linux/arm64 --file 17.0/Dockerfile -t cimg/postgres:17.0 -t cimg/postgres:17.0 --push . -docker buildx build --platform=linux/amd64,linux/arm64 --file 17.0/postgis/Dockerfile -t cimg/postgres:17.0-postgis -t cimg/postgres:17.0-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 17.2/Dockerfile -t cimg/postgres:17.2 -t cimg/postgres:17.2 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 17.2/postgis/Dockerfile -t cimg/postgres:17.2-postgis -t cimg/postgres:17.2-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 16.6/Dockerfile -t cimg/postgres:16.6 -t cimg/postgres:16.6 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 16.6/postgis/Dockerfile -t cimg/postgres:16.6-postgis -t cimg/postgres:16.6-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 15.10/Dockerfile -t cimg/postgres:15.10 -t cimg/postgres:15.10 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 15.10/postgis/Dockerfile -t cimg/postgres:15.10-postgis -t cimg/postgres:15.10-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 14.15/Dockerfile -t cimg/postgres:14.15 -t cimg/postgres:14.15 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 14.15/postgis/Dockerfile -t cimg/postgres:14.15-postgis -t cimg/postgres:14.15-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 13.18/Dockerfile -t cimg/postgres:13.18 -t cimg/postgres:13.18 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 13.18/postgis/Dockerfile -t cimg/postgres:13.18-postgis -t cimg/postgres:13.18-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 12.22/Dockerfile -t cimg/postgres:12.22 -t cimg/postgres:12.22 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 12.22/postgis/Dockerfile -t cimg/postgres:12.22-postgis -t cimg/postgres:12.22-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 17.1/Dockerfile -t cimg/postgres:17.1 -t cimg/postgres:17.1 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 17.1/postgis/Dockerfile -t cimg/postgres:17.1-postgis -t cimg/postgres:17.1-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 16.5/Dockerfile -t cimg/postgres:16.5 -t cimg/postgres:16.5 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 16.5/postgis/Dockerfile -t cimg/postgres:16.5-postgis -t cimg/postgres:16.5-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 15.9/Dockerfile -t cimg/postgres:15.9 -t cimg/postgres:15.9 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 15.9/postgis/Dockerfile -t cimg/postgres:15.9-postgis -t cimg/postgres:15.9-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 14.14/Dockerfile -t cimg/postgres:14.14 -t cimg/postgres:14.14 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 14.14/postgis/Dockerfile -t cimg/postgres:14.14-postgis -t cimg/postgres:14.14-postgis --push .