From 84f40b9e90ffce9074668d403e4d15bfce094c40 Mon Sep 17 00:00:00 2001 From: Nigel Kukard <nkukard@lbsd.net> Date: Fri, 31 May 2024 06:00:13 +0000 Subject: [PATCH 1/7] chore: updated to timescaledb 2.5.1 --- Dockerfile | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/Dockerfile b/Dockerfile index 95d8643..e54c733 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,6 +54,62 @@ RUN set -eux; \ +FROM tsbuilder-base as tsbuilder-2.15.1 + +ENV TIMESCALEDB_VER=2.15.1 + +# Checkout the right version +RUN set -eux; \ + cd build; \ + cd timescaledb; \ + git checkout "$TIMESCALEDB_VER" + +# Build +RUN set -eux; \ + cd build; \ + cd "timescaledb"; \ +# Patching +# patch -p1 < ../patches/timescaledb-2.14.0-fix-test-output.patch; \ + mkdir build; \ + cd build; \ + \ + cmake ..; \ + make VERBOSE=1 -j$(nproc) -l 8; \ + make DESTDIR="/build/timescaledb-root" install; \ + # We need to install a second time to run timescaledb tests + echo "Size before stripping..."; \ + du -hs /build/timescaledb-root + +# Strip binaries +RUN set -eux; \ + cd build/timescaledb-root; \ + scanelf --recursive --nobanner --osabi --etype "ET_DYN,ET_EXEC" . | awk '{print $3}' | xargs \ + strip \ + --remove-section=.comment \ + --remove-section=.note \ + -R .gnu.lto_* -R .gnu.debuglto_* \ + -N __gnu_lto_slim -N __gnu_lto_v1 \ + --strip-unneeded; \ + echo "Size after stripping..."; \ + du -hs /build/timescaledb-root + +# Testing +RUN set -eux; \ + # Install TimescaleDB so we can run the installcheck tests below + tar -c -C /build/timescaledb-root . | tar -x -C /; \ + # For testing we need to run the tests as a non-priv user + cd build; \ + adduser -D pgsqltest; \ + chown -R pgsqltest:pgsqltest "timescaledb"; \ + cd "timescaledb"; \ + cd build; \ + # Test + if ! sudo -u pgsqltest make VERBOSE=1 -j1 -l8 installcheck; then \ + cat test/regression.diffs; \ + false; \ + fi + + FROM tsbuilder-base as tsbuilder-2.15.0 ENV TIMESCALEDB_VER=2.15.0 @@ -288,6 +344,7 @@ COPY --from=tsbuilder-2.14.0 /build/timescaledb-root / COPY --from=tsbuilder-2.14.1 /build/timescaledb-root / COPY --from=tsbuilder-2.14.2 /build/timescaledb-root / COPY --from=tsbuilder-2.15.0 /build/timescaledb-root / +COPY --from=tsbuilder-2.15.1 /build/timescaledb-root / ARG VERSION_INFO= -- GitLab From 54341e7abca239197ddd156060f896c375f4ba5c Mon Sep 17 00:00:00 2001 From: Nigel Kukard <nkukard@lbsd.net> Date: Sat, 8 Jun 2024 07:15:40 +0000 Subject: [PATCH 2/7] chore: updated to version 2.15.2 --- Dockerfile | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/Dockerfile b/Dockerfile index e54c733..651537b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,6 +54,62 @@ RUN set -eux; \ +FROM tsbuilder-base as tsbuilder-2.15.2 + +ENV TIMESCALEDB_VER=2.15.2 + +# Checkout the right version +RUN set -eux; \ + cd build; \ + cd timescaledb; \ + git checkout "$TIMESCALEDB_VER" + +# Build +RUN set -eux; \ + cd build; \ + cd "timescaledb"; \ +# Patching +# patch -p1 < ../patches/timescaledb-2.14.0-fix-test-output.patch; \ + mkdir build; \ + cd build; \ + \ + cmake ..; \ + make VERBOSE=1 -j$(nproc) -l 8; \ + make DESTDIR="/build/timescaledb-root" install; \ + # We need to install a second time to run timescaledb tests + echo "Size before stripping..."; \ + du -hs /build/timescaledb-root + +# Strip binaries +RUN set -eux; \ + cd build/timescaledb-root; \ + scanelf --recursive --nobanner --osabi --etype "ET_DYN,ET_EXEC" . | awk '{print $3}' | xargs \ + strip \ + --remove-section=.comment \ + --remove-section=.note \ + -R .gnu.lto_* -R .gnu.debuglto_* \ + -N __gnu_lto_slim -N __gnu_lto_v1 \ + --strip-unneeded; \ + echo "Size after stripping..."; \ + du -hs /build/timescaledb-root + +# Testing +RUN set -eux; \ + # Install TimescaleDB so we can run the installcheck tests below + tar -c -C /build/timescaledb-root . | tar -x -C /; \ + # For testing we need to run the tests as a non-priv user + cd build; \ + adduser -D pgsqltest; \ + chown -R pgsqltest:pgsqltest "timescaledb"; \ + cd "timescaledb"; \ + cd build; \ + # Test + if ! sudo -u pgsqltest make VERBOSE=1 -j1 -l8 installcheck; then \ + cat test/regression.diffs; \ + false; \ + fi + + FROM tsbuilder-base as tsbuilder-2.15.1 ENV TIMESCALEDB_VER=2.15.1 @@ -345,6 +401,7 @@ COPY --from=tsbuilder-2.14.1 /build/timescaledb-root / COPY --from=tsbuilder-2.14.2 /build/timescaledb-root / COPY --from=tsbuilder-2.15.0 /build/timescaledb-root / COPY --from=tsbuilder-2.15.1 /build/timescaledb-root / +COPY --from=tsbuilder-2.15.2 /build/timescaledb-root / ARG VERSION_INFO= -- GitLab From 2632ec903f680595741639e1f749b3f25295db6d Mon Sep 17 00:00:00 2001 From: Nigel Kukard <nkukard@lbsd.net> Date: Tue, 3 Dec 2024 01:40:46 +0000 Subject: [PATCH 3/7] chore: updated to postgresql 17.2 and timescaledb 2.17.2 --- Dockerfile | 243 ++--------------------------------------------------- 1 file changed, 7 insertions(+), 236 deletions(-) diff --git a/Dockerfile b/Dockerfile index 651537b..19561b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ FROM registry.conarx.tech/containers/postgresql/edge as tsbuilder-base -ENV POSTGRESQL_VER=16.3 +ENV POSTGRESQL_VER=17.2 # Copy build patches COPY patches build/patches @@ -54,9 +54,9 @@ RUN set -eux; \ -FROM tsbuilder-base as tsbuilder-2.15.2 +FROM tsbuilder-base as tsbuilder-2.17.2 -ENV TIMESCALEDB_VER=2.15.2 +ENV TIMESCALEDB_VER=2.17.2 # Checkout the right version RUN set -eux; \ @@ -110,9 +110,9 @@ RUN set -eux; \ fi -FROM tsbuilder-base as tsbuilder-2.15.1 +FROM tsbuilder-base as tsbuilder-2.17.1 -ENV TIMESCALEDB_VER=2.15.1 +ENV TIMESCALEDB_VER=2.17.1 # Checkout the right version RUN set -eux; \ @@ -166,242 +166,13 @@ RUN set -eux; \ fi -FROM tsbuilder-base as tsbuilder-2.15.0 - -ENV TIMESCALEDB_VER=2.15.0 - -# Checkout the right version -RUN set -eux; \ - cd build; \ - cd timescaledb; \ - git checkout "$TIMESCALEDB_VER" - -# Build -RUN set -eux; \ - cd build; \ - cd "timescaledb"; \ -# Patching -# patch -p1 < ../patches/timescaledb-2.14.0-fix-test-output.patch; \ - mkdir build; \ - cd build; \ - \ - cmake ..; \ - make VERBOSE=1 -j$(nproc) -l 8; \ - make DESTDIR="/build/timescaledb-root" install; \ - # We need to install a second time to run timescaledb tests - echo "Size before stripping..."; \ - du -hs /build/timescaledb-root - -# Strip binaries -RUN set -eux; \ - cd build/timescaledb-root; \ - scanelf --recursive --nobanner --osabi --etype "ET_DYN,ET_EXEC" . | awk '{print $3}' | xargs \ - strip \ - --remove-section=.comment \ - --remove-section=.note \ - -R .gnu.lto_* -R .gnu.debuglto_* \ - -N __gnu_lto_slim -N __gnu_lto_v1 \ - --strip-unneeded; \ - echo "Size after stripping..."; \ - du -hs /build/timescaledb-root - -# Testing -RUN set -eux; \ - # Install TimescaleDB so we can run the installcheck tests below - tar -c -C /build/timescaledb-root . | tar -x -C /; \ - # For testing we need to run the tests as a non-priv user - cd build; \ - adduser -D pgsqltest; \ - chown -R pgsqltest:pgsqltest "timescaledb"; \ - cd "timescaledb"; \ - cd build; \ - # Test - if ! sudo -u pgsqltest make VERBOSE=1 -j1 -l8 installcheck; then \ - cat test/regression.diffs; \ - false; \ - fi - - -FROM tsbuilder-base as tsbuilder-2.14.2 - -ENV TIMESCALEDB_VER=2.14.2 - -# Checkout the right version -RUN set -eux; \ - cd build; \ - cd timescaledb; \ - git checkout "$TIMESCALEDB_VER" - -# Build -RUN set -eux; \ - cd build; \ - cd "timescaledb"; \ -# Patching -# patch -p1 < ../patches/timescaledb-2.14.0-fix-test-output.patch; \ - mkdir build; \ - cd build; \ - \ - cmake ..; \ - make VERBOSE=1 -j$(nproc) -l 8; \ - make DESTDIR="/build/timescaledb-root" install; \ - # We need to install a second time to run timescaledb tests - echo "Size before stripping..."; \ - du -hs /build/timescaledb-root - -# Strip binaries -RUN set -eux; \ - cd build/timescaledb-root; \ - scanelf --recursive --nobanner --osabi --etype "ET_DYN,ET_EXEC" . | awk '{print $3}' | xargs \ - strip \ - --remove-section=.comment \ - --remove-section=.note \ - -R .gnu.lto_* -R .gnu.debuglto_* \ - -N __gnu_lto_slim -N __gnu_lto_v1 \ - --strip-unneeded; \ - echo "Size after stripping..."; \ - du -hs /build/timescaledb-root - -# Testing -RUN set -eux; \ - # Install TimescaleDB so we can run the installcheck tests below - tar -c -C /build/timescaledb-root . | tar -x -C /; \ - # For testing we need to run the tests as a non-priv user - cd build; \ - adduser -D pgsqltest; \ - chown -R pgsqltest:pgsqltest "timescaledb"; \ - cd "timescaledb"; \ - cd build; \ - # Test - if ! sudo -u pgsqltest make VERBOSE=1 -j1 -l8 installcheck; then \ - cat test/regression.diffs; \ - false; \ - fi - - - -FROM tsbuilder-base as tsbuilder-2.14.1 - -ENV TIMESCALEDB_VER=2.14.1 - -# Checkout the right version -RUN set -eux; \ - cd build; \ - cd timescaledb; \ - git checkout "$TIMESCALEDB_VER" - -# Build -RUN set -eux; \ - cd build; \ - cd "timescaledb"; \ -# Patching -# patch -p1 < ../patches/timescaledb-2.14.0-fix-test-output.patch; \ - mkdir build; \ - cd build; \ - \ - cmake ..; \ - make VERBOSE=1 -j$(nproc) -l 8; \ - make DESTDIR="/build/timescaledb-root" install; \ - # We need to install a second time to run timescaledb tests - echo "Size before stripping..."; \ - du -hs /build/timescaledb-root - -# Strip binaries -RUN set -eux; \ - cd build/timescaledb-root; \ - scanelf --recursive --nobanner --osabi --etype "ET_DYN,ET_EXEC" . | awk '{print $3}' | xargs \ - strip \ - --remove-section=.comment \ - --remove-section=.note \ - -R .gnu.lto_* -R .gnu.debuglto_* \ - -N __gnu_lto_slim -N __gnu_lto_v1 \ - --strip-unneeded; \ - echo "Size after stripping..."; \ - du -hs /build/timescaledb-root - -# Testing -RUN set -eux; \ - # Install TimescaleDB so we can run the installcheck tests below - tar -c -C /build/timescaledb-root . | tar -x -C /; \ - # For testing we need to run the tests as a non-priv user - cd build; \ - adduser -D pgsqltest; \ - chown -R pgsqltest:pgsqltest "timescaledb"; \ - cd "timescaledb"; \ - cd build; \ - # Test - if ! sudo -u pgsqltest make VERBOSE=1 -j1 -l8 installcheck; then \ - cat test/regression.diffs; \ - false; \ - fi - - -FROM tsbuilder-base as tsbuilder-2.14.0 - -ENV TIMESCALEDB_VER=2.14.0 - -# Checkout the right version -RUN set -eux; \ - cd build; \ - cd timescaledb; \ - git checkout "$TIMESCALEDB_VER" - -# Build -RUN set -eux; \ - cd build; \ - cd "timescaledb"; \ -# Patching - patch -p1 < ../patches/timescaledb-2.14.0-fix-test-output.patch; \ - mkdir build; \ - cd build; \ - \ - cmake ..; \ - make VERBOSE=1 -j$(nproc) -l 8; \ - make DESTDIR="/build/timescaledb-root" install; \ - # We need to install a second time to run timescaledb tests - echo "Size before stripping..."; \ - du -hs /build/timescaledb-root - -# Strip binaries -RUN set -eux; \ - cd build/timescaledb-root; \ - scanelf --recursive --nobanner --osabi --etype "ET_DYN,ET_EXEC" . | awk '{print $3}' | xargs \ - strip \ - --remove-section=.comment \ - --remove-section=.note \ - -R .gnu.lto_* -R .gnu.debuglto_* \ - -N __gnu_lto_slim -N __gnu_lto_v1 \ - --strip-unneeded; \ - echo "Size after stripping..."; \ - du -hs /build/timescaledb-root - -# Testing -RUN set -eux; \ - # Install TimescaleDB so we can run the installcheck tests below - tar -c -C /build/timescaledb-root . | tar -x -C /; \ - # For testing we need to run the tests as a non-priv user - cd build; \ - adduser -D pgsqltest; \ - chown -R pgsqltest:pgsqltest "timescaledb"; \ - cd "timescaledb"; \ - cd build; \ - # Test - if ! sudo -u pgsqltest make VERBOSE=1 -j1 -l8 installcheck; then \ - cat test/regression.diffs; \ - false; \ - fi - - FROM registry.conarx.tech/containers/postgresql/edge # NK: Versions are reverse ordered so newer ones overwrite data from older ones -COPY --from=tsbuilder-2.14.0 /build/timescaledb-root / -COPY --from=tsbuilder-2.14.1 /build/timescaledb-root / -COPY --from=tsbuilder-2.14.2 /build/timescaledb-root / -COPY --from=tsbuilder-2.15.0 /build/timescaledb-root / -COPY --from=tsbuilder-2.15.1 /build/timescaledb-root / -COPY --from=tsbuilder-2.15.2 /build/timescaledb-root / +COPY --from=tsbuilder-2.17.1 /build/timescaledb-root / +COPY --from=tsbuilder-2.17.2 /build/timescaledb-root / ARG VERSION_INFO= -- GitLab From 71aefdbda2bffbe2f7bfba555797bee917abfb18 Mon Sep 17 00:00:00 2001 From: Nigel Kukard <nkukard@lbsd.net> Date: Mon, 23 Dec 2024 02:44:20 +0000 Subject: [PATCH 4/7] chore: removed multiple versions of timescaledb --- Dockerfile | 57 ------------------------------------------------------ 1 file changed, 57 deletions(-) diff --git a/Dockerfile b/Dockerfile index 19561b1..c3cc543 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,68 +110,11 @@ RUN set -eux; \ fi -FROM tsbuilder-base as tsbuilder-2.17.1 - -ENV TIMESCALEDB_VER=2.17.1 - -# Checkout the right version -RUN set -eux; \ - cd build; \ - cd timescaledb; \ - git checkout "$TIMESCALEDB_VER" - -# Build -RUN set -eux; \ - cd build; \ - cd "timescaledb"; \ -# Patching -# patch -p1 < ../patches/timescaledb-2.14.0-fix-test-output.patch; \ - mkdir build; \ - cd build; \ - \ - cmake ..; \ - make VERBOSE=1 -j$(nproc) -l 8; \ - make DESTDIR="/build/timescaledb-root" install; \ - # We need to install a second time to run timescaledb tests - echo "Size before stripping..."; \ - du -hs /build/timescaledb-root - -# Strip binaries -RUN set -eux; \ - cd build/timescaledb-root; \ - scanelf --recursive --nobanner --osabi --etype "ET_DYN,ET_EXEC" . | awk '{print $3}' | xargs \ - strip \ - --remove-section=.comment \ - --remove-section=.note \ - -R .gnu.lto_* -R .gnu.debuglto_* \ - -N __gnu_lto_slim -N __gnu_lto_v1 \ - --strip-unneeded; \ - echo "Size after stripping..."; \ - du -hs /build/timescaledb-root - -# Testing -RUN set -eux; \ - # Install TimescaleDB so we can run the installcheck tests below - tar -c -C /build/timescaledb-root . | tar -x -C /; \ - # For testing we need to run the tests as a non-priv user - cd build; \ - adduser -D pgsqltest; \ - chown -R pgsqltest:pgsqltest "timescaledb"; \ - cd "timescaledb"; \ - cd build; \ - # Test - if ! sudo -u pgsqltest make VERBOSE=1 -j1 -l8 installcheck; then \ - cat test/regression.diffs; \ - false; \ - fi - - FROM registry.conarx.tech/containers/postgresql/edge # NK: Versions are reverse ordered so newer ones overwrite data from older ones -COPY --from=tsbuilder-2.17.1 /build/timescaledb-root / COPY --from=tsbuilder-2.17.2 /build/timescaledb-root / -- GitLab From 4f2d34ecf88a8e6fcda6f804b8d5e645ac3d734e Mon Sep 17 00:00:00 2001 From: Nigel Kukard <nkukard@lbsd.net> Date: Tue, 7 Jan 2025 19:53:07 +0000 Subject: [PATCH 5/7] chore: updated copyright to 2025 --- Dockerfile | 2 +- get_release_version | 2 +- .../pre-init-tests.d/44-postgresql-timescaledb.sh | 2 +- .../tests.d/44-postgresql-timescaledb.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c3cc543..fde87c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2023, AllWorldIT. +# Copyright (c) 2022-2025, AllWorldIT. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to diff --git a/get_release_version b/get_release_version index 6c00d88..d5ac8d4 100755 --- a/get_release_version +++ b/get_release_version @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2022-2023, AllWorldIT. +# Copyright (c) 2022-2025, AllWorldIT. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to diff --git a/usr/local/share/flexible-docker-containers/pre-init-tests.d/44-postgresql-timescaledb.sh b/usr/local/share/flexible-docker-containers/pre-init-tests.d/44-postgresql-timescaledb.sh index 521ccb6..42f2eba 100644 --- a/usr/local/share/flexible-docker-containers/pre-init-tests.d/44-postgresql-timescaledb.sh +++ b/usr/local/share/flexible-docker-containers/pre-init-tests.d/44-postgresql-timescaledb.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2023, AllWorldIT. +# Copyright (c) 2022-2025, AllWorldIT. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to diff --git a/usr/local/share/flexible-docker-containers/tests.d/44-postgresql-timescaledb.sh b/usr/local/share/flexible-docker-containers/tests.d/44-postgresql-timescaledb.sh index 5b29300..48f74e6 100644 --- a/usr/local/share/flexible-docker-containers/tests.d/44-postgresql-timescaledb.sh +++ b/usr/local/share/flexible-docker-containers/tests.d/44-postgresql-timescaledb.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2023, AllWorldIT. +# Copyright (c) 2022-2025, AllWorldIT. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to -- GitLab From 75346c41f27ff24c41380921f73215303b88288a Mon Sep 17 00:00:00 2001 From: Nigel Kukard <nkukard@lbsd.net> Date: Tue, 7 Jan 2025 19:56:23 +0000 Subject: [PATCH 6/7] fix: fixed LABEL syntax --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fde87c6..1a170e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -119,9 +119,9 @@ COPY --from=tsbuilder-2.17.2 /build/timescaledb-root / ARG VERSION_INFO= -LABEL org.opencontainers.image.authors "Nigel Kukard <nkukard@conarx.tech>" -LABEL org.opencontainers.image.version "edge" -LABEL org.opencontainers.image.base.name "registry.conarx.tech/containers/postgresql/edge" +LABEL org.opencontainers.image.authors = "Nigel Kukard <nkukard@conarx.tech>" +LABEL org.opencontainers.image.version = "edge" +LABEL org.opencontainers.image.base.name = "registry.conarx.tech/containers/postgresql/edge" RUN set -eux; \ -- GitLab From f61df5b8bd358e274c95031c45ad53a10c44731f Mon Sep 17 00:00:00 2001 From: Nigel Kukard <nkukard@lbsd.net> Date: Tue, 7 Jan 2025 20:22:58 +0000 Subject: [PATCH 7/7] chore: updated to Alpine 3.21 --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a8657ac..3dc9d86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ # IN THE SOFTWARE. -FROM registry.conarx.tech/containers/postgresql/3.20 as tsbuilder-base +FROM registry.conarx.tech/containers/postgresql/3.21 as tsbuilder-base ENV POSTGRESQL_VER=17.2 @@ -111,7 +111,7 @@ RUN set -eux; \ -FROM registry.conarx.tech/containers/postgresql/3.20 +FROM registry.conarx.tech/containers/postgresql/3.21 # NK: Versions are reverse ordered so newer ones overwrite data from older ones @@ -120,8 +120,8 @@ COPY --from=tsbuilder-2.17.2 /build/timescaledb-root / ARG VERSION_INFO= LABEL org.opencontainers.image.authors = "Nigel Kukard <nkukard@conarx.tech>" -LABEL org.opencontainers.image.version = "3.20" -LABEL org.opencontainers.image.base.name = "registry.conarx.tech/containers/postgresql/3.20" +LABEL org.opencontainers.image.version = "3.21" +LABEL org.opencontainers.image.base.name = "registry.conarx.tech/containers/postgresql/3.21" RUN set -eux; \ -- GitLab