diff --git a/13.23/Dockerfile b/13.23/Dockerfile new file mode 100644 index 0000000..adcc465 --- /dev/null +++ b/13.23/Dockerfile @@ -0,0 +1,121 @@ +# 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.23 +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 if [ $PG_MAJOR -ge 17 ]; then PG_RELEASE=world-bin; else PG_RELEASE=world; fi && \ + 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) $PG_RELEASE && \ + make install-$PG_RELEASE && \ + 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.23/postgis/Dockerfile b/13.23/postgis/Dockerfile new file mode 100644 index 0000000..7ecbcf0 --- /dev/null +++ b/13.23/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:13.23 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.6.1 +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.20/Dockerfile b/14.20/Dockerfile new file mode 100644 index 0000000..d6ed5f2 --- /dev/null +++ b/14.20/Dockerfile @@ -0,0 +1,121 @@ +# 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.20 +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 if [ $PG_MAJOR -ge 17 ]; then PG_RELEASE=world-bin; else PG_RELEASE=world; fi && \ + 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) $PG_RELEASE && \ + make install-$PG_RELEASE && \ + 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.20/postgis/Dockerfile b/14.20/postgis/Dockerfile new file mode 100644 index 0000000..e3ec0b9 --- /dev/null +++ b/14.20/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:14.20 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.6.1 +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.15/Dockerfile b/15.15/Dockerfile new file mode 100644 index 0000000..3ad4fc8 --- /dev/null +++ b/15.15/Dockerfile @@ -0,0 +1,121 @@ +# 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.15 +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 if [ $PG_MAJOR -ge 17 ]; then PG_RELEASE=world-bin; else PG_RELEASE=world; fi && \ + 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) $PG_RELEASE && \ + make install-$PG_RELEASE && \ + 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.15/postgis/Dockerfile b/15.15/postgis/Dockerfile new file mode 100644 index 0000000..300f01c --- /dev/null +++ b/15.15/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:15.15 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.6.1 +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.11/Dockerfile b/16.11/Dockerfile new file mode 100644 index 0000000..bd51be0 --- /dev/null +++ b/16.11/Dockerfile @@ -0,0 +1,121 @@ +# 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.11 +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 if [ $PG_MAJOR -ge 17 ]; then PG_RELEASE=world-bin; else PG_RELEASE=world; fi && \ + 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) $PG_RELEASE && \ + make install-$PG_RELEASE && \ + 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.11/postgis/Dockerfile b/16.11/postgis/Dockerfile new file mode 100644 index 0000000..f455da3 --- /dev/null +++ b/16.11/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:16.11 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.6.1 +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.7/Dockerfile b/17.7/Dockerfile new file mode 100644 index 0000000..95b88b9 --- /dev/null +++ b/17.7/Dockerfile @@ -0,0 +1,121 @@ +# 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.7 +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 if [ $PG_MAJOR -ge 17 ]; then PG_RELEASE=world-bin; else PG_RELEASE=world; fi && \ + 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) $PG_RELEASE && \ + make install-$PG_RELEASE && \ + 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.7/postgis/Dockerfile b/17.7/postgis/Dockerfile new file mode 100644 index 0000000..0a5f7eb --- /dev/null +++ b/17.7/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:17.7 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.6.1 +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/18.1/Dockerfile b/18.1/Dockerfile new file mode 100644 index 0000000..997a7cc --- /dev/null +++ b/18.1/Dockerfile @@ -0,0 +1,121 @@ +# 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=18.1 +ENV PG_MAJOR=18 +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 if [ $PG_MAJOR -ge 17 ]; then PG_RELEASE=world-bin; else PG_RELEASE=world; fi && \ + 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) $PG_RELEASE && \ + make install-$PG_RELEASE && \ + 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/18.1/postgis/Dockerfile b/18.1/postgis/Dockerfile new file mode 100644 index 0000000..a643c23 --- /dev/null +++ b/18.1/postgis/Dockerfile @@ -0,0 +1,29 @@ +# vim:set ft=dockerfile: + +FROM cimg/postgres:18.1 + +LABEL maintainer="Community & Partner Engineering Team " + +ENV POSTGIS_VER=3.6.1 +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 a0d91a8..05bb829 100644 --- a/GEN-CHECK +++ b/GEN-CHECK @@ -1 +1 @@ -GEN_CHECK=(18.0) +GEN_CHECK=(18.1 17.7 16.11 15.15 14.20 13.23) diff --git a/build-images.sh b/build-images.sh index 9272c14..98172b7 100755 --- a/build-images.sh +++ b/build-images.sh @@ -4,5 +4,15 @@ set -eo pipefail docker context create cimg docker buildx create --use cimg -docker buildx build --platform=linux/amd64,linux/arm64 --file 18.0/Dockerfile -t cimg/postgres:18.0 -t cimg/postgres:18.0 --push . -docker buildx build --platform=linux/amd64,linux/arm64 --file 18.0/postgis/Dockerfile -t cimg/postgres:18.0-postgis -t cimg/postgres:18.0-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 18.1/Dockerfile -t cimg/postgres:18.1 -t cimg/postgres:18.1 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 18.1/postgis/Dockerfile -t cimg/postgres:18.1-postgis -t cimg/postgres:18.1-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 17.7/Dockerfile -t cimg/postgres:17.7 -t cimg/postgres:17.7 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 17.7/postgis/Dockerfile -t cimg/postgres:17.7-postgis -t cimg/postgres:17.7-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 16.11/Dockerfile -t cimg/postgres:16.11 -t cimg/postgres:16.11 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 16.11/postgis/Dockerfile -t cimg/postgres:16.11-postgis -t cimg/postgres:16.11-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 15.15/Dockerfile -t cimg/postgres:15.15 -t cimg/postgres:15.15 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 15.15/postgis/Dockerfile -t cimg/postgres:15.15-postgis -t cimg/postgres:15.15-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 14.20/Dockerfile -t cimg/postgres:14.20 -t cimg/postgres:14.20 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 14.20/postgis/Dockerfile -t cimg/postgres:14.20-postgis -t cimg/postgres:14.20-postgis --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 13.23/Dockerfile -t cimg/postgres:13.23 -t cimg/postgres:13.23 --push . +docker buildx build --platform=linux/amd64,linux/arm64 --file 13.23/postgis/Dockerfile -t cimg/postgres:13.23-postgis -t cimg/postgres:13.23-postgis --push . diff --git a/variants/postgis.Dockerfile.template b/variants/postgis.Dockerfile.template index 6e42a9c..0a66308 100644 --- a/variants/postgis.Dockerfile.template +++ b/variants/postgis.Dockerfile.template @@ -4,7 +4,7 @@ FROM cimg/%%PARENT%%:%%PARENT_TAG%% LABEL maintainer="Community & Partner Engineering Team " -ENV POSTGIS_VER=3.6.0 +ENV POSTGIS_VER=3.6.1 RUN apt-get update && apt-get install -y --no-install-recommends \ clang \ g++ \