alexandrump
  • Joined on 2026-02-01

invest/timescaledb (latest)

Published 2026-04-06 16:27:53 +00:00 by alexandrump

Installation

docker pull git.thax.es/alexandrump/invest/timescaledb:latest
sha256:36e36dc474461119cd5c0ae662837aef31d3026e4503db3bcdddf4713d77bcc4

Image Layers

ADD alpine-minirootfs-3.23.3-x86_64.tar.gz / # buildkit
CMD ["/bin/sh"]
RUN /bin/sh -c set -eux; addgroup -g 70 -S postgres; adduser -u 70 -S -D -G postgres -H -h /var/lib/postgresql -s /bin/sh postgres; install --verbose --directory --owner postgres --group postgres --mode 1777 /var/lib/postgresql # buildkit
ENV GOSU_VERSION=1.19
RUN /bin/sh -c set -eux; apk add --no-cache --virtual .gosu-deps ca-certificates dpkg gnupg ; dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; export GNUPGHOME="$(mktemp -d)"; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; gpgconf --kill all; rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; apk del --no-network .gosu-deps; chmod +x /usr/local/bin/gosu; gosu --version; gosu nobody true # buildkit
RUN /bin/sh -c set -eux; ln -svf gosu /usr/local/bin/su-exec; su-exec nobody true # backwards compatibility (removed in PostgreSQL 17+) # buildkit
ENV LANG=en_US.utf8
RUN /bin/sh -c mkdir /docker-entrypoint-initdb.d # buildkit
ENV PG_MAJOR=16
ENV PG_VERSION=16.13
ENV PG_SHA256=dc2ddbbd245c0265a689408e3d2f2f3f9ba2da96bd19318214b313cdd9797287
ENV DOCKER_PG_LLVM_DEPS=llvm19-dev clang19
RUN /bin/sh -c set -eux; wget -O postgresql.tar.bz2 "https://ftp.postgresql.org/pub/source/v$PG_VERSION/postgresql-$PG_VERSION.tar.bz2"; echo "$PG_SHA256 *postgresql.tar.bz2" | sha256sum -c -; mkdir -p /usr/src/postgresql; tar --extract --file postgresql.tar.bz2 --directory /usr/src/postgresql --strip-components 1 ; rm postgresql.tar.bz2; apk add --no-cache --virtual .build-deps $DOCKER_PG_LLVM_DEPS bison coreutils dpkg-dev dpkg flex g++ gcc krb5-dev libc-dev libedit-dev libxml2-dev libxslt-dev linux-headers make openldap-dev openssl-dev perl-dev perl-ipc-run perl-utils python3-dev tcl-dev util-linux-dev zlib-dev icu-dev lz4-dev zstd-dev ; cd /usr/src/postgresql; awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new; grep '/var/run/postgresql' src/include/pg_config_manual.h.new; mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; export LLVM_CONFIG="/usr/lib/llvm19/bin/llvm-config"; export CLANG=clang-19; ./configure --enable-option-checking=fatal --build="$gnuArch" --enable-integer-datetimes --enable-thread-safety --enable-tap-tests --disable-rpath --with-uuid=e2fs --with-pgport=5432 --with-system-tzdata=/usr/share/zoneinfo --prefix=/usr/local --with-includes=/usr/local/include --with-libraries=/usr/local/lib --with-gssapi --with-icu --with-ldap --with-libxml --with-libxslt --with-llvm --with-lz4 --with-openssl --with-perl --with-python --with-tcl --with-zstd ; make -j "$(nproc)" world-bin; make install-world-bin; make -C contrib install; runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' | grep -v -e perl -e python -e tcl )"; apk add --no-cache --virtual .postgresql-rundeps $runDeps bash tzdata zstd icu-data-full $([ "$(apk --print-arch)" != 'ppc64le' ] && echo 'nss_wrapper') ; apk del --no-network .build-deps; cd /; rm -rf /usr/src/postgresql /usr/local/share/doc /usr/local/share/man ; postgres --version # buildkit
RUN /bin/sh -c set -eux; cp -v /usr/local/share/postgresql/postgresql.conf.sample /usr/local/share/postgresql/postgresql.conf.sample.orig; sed -ri "s!^#?(listen_addresses)\s*=\s*\S+.*!\1 = '*'!" /usr/local/share/postgresql/postgresql.conf.sample; grep -F "listen_addresses = '*'" /usr/local/share/postgresql/postgresql.conf.sample # buildkit
RUN /bin/sh -c install --verbose --directory --owner postgres --group postgres --mode 3777 /var/run/postgresql # buildkit
ENV PGDATA=/var/lib/postgresql/data
RUN /bin/sh -c install --verbose --directory --owner postgres --group postgres --mode 1777 "$PGDATA" # buildkit
VOLUME [/var/lib/postgresql/data]
COPY docker-entrypoint.sh docker-ensure-initdb.sh /usr/local/bin/ # buildkit
RUN /bin/sh -c ln -sT docker-ensure-initdb.sh /usr/local/bin/docker-enforce-initdb.sh # buildkit
ENTRYPOINT ["docker-entrypoint.sh"]
STOPSIGNAL SIGINT
EXPOSE map[5432/tcp:{}]
CMD ["postgres"]
ARG OSS_ONLY
LABEL maintainer=Timescale https://www.timescale.com
ARG PG_VERSION=16
ARG PG_MAJOR_VERSION=16
ARG ALPINE_VERSION=3.23
RUN |4 OSS_ONLY= PG_VERSION=16 PG_MAJOR_VERSION=16 ALPINE_VERSION=3.23 /bin/sh -c set -ex; echo "https://dl-cdn.alpinelinux.org/alpine/v${ALPINE_VERSION}/community/" >> /etc/apk/repositories; apk update; if [ "$PG_MAJOR_VERSION" -ge 16 && "$PG_MAJOR_VERSION" -lt 18 ] ; then apk add --no-cache postgresql${PG_VERSION}-plpython3; fi # buildkit
ARG PGVECTOR_VERSION=v0.8.1
ARG PG_VERSION=16
ARG CLANG_VERSION=19
ARG PG_MAJOR_VERSION=16
RUN |6 OSS_ONLY= PG_VERSION=16 PG_MAJOR_VERSION=16 ALPINE_VERSION=3.23 PGVECTOR_VERSION=v0.8.1 CLANG_VERSION=19 /bin/sh -c set -ex; apk update; apk add --no-cache --virtual .vector-deps postgresql${PG_VERSION}-dev git build-base clang${CLANG_VERSION} llvm${CLANG_VERSION}-dev llvm${CLANG_VERSION}; git clone --branch ${PGVECTOR_VERSION} https://github.com/pgvector/pgvector.git /build/pgvector; cd /build/pgvector; make OPTFLAGS=""; make install; apk del .vector-deps # buildkit
COPY docker-entrypoint-initdb.d/* /docker-entrypoint-initdb.d/ # buildkit
COPY /go/bin/* /usr/local/bin/ # buildkit
COPY /usr/local/lib/postgresql/timescaledb-*.so /usr/local/lib/postgresql/ # buildkit
COPY /usr/local/share/postgresql/extension/timescaledb--*.sql /usr/local/share/postgresql/extension/ # buildkit
ARG TS_VERSION=2.26.1
RUN |7 OSS_ONLY= PG_VERSION=16 PG_MAJOR_VERSION=16 ALPINE_VERSION=3.23 PGVECTOR_VERSION=v0.8.1 CLANG_VERSION=19 TS_VERSION=2.26.1 /bin/sh -c set -ex && apk add --no-cache --virtual .fetch-deps ca-certificates git openssl openssl-dev tar && mkdir -p /build/ && git clone https://github.com/timescale/timescaledb /build/timescaledb && apk add --no-cache --virtual .build-deps coreutils dpkg-dev dpkg icu-dev gcc libc-dev make cmake util-linux-dev && cd /build/timescaledb && rm -fr build && git checkout ${TS_VERSION} && ./bootstrap -DCMAKE_BUILD_TYPE=RelWithDebInfo -DREGRESS_CHECKS=OFF -DTAP_CHECKS=OFF -DGENERATE_DOWNGRADE_SCRIPT=ON -DWARNINGS_AS_ERRORS=OFF -DPROJECT_INSTALL_METHOD="docker"${OSS_ONLY} && cd build && make install && cd ~ && if [ "${OSS_ONLY}" != "" ]; then rm -f $(pg_config --pkglibdir)/timescaledb-tsl-*.so; fi && apk del .fetch-deps .build-deps && rm -rf /build && sed -r -i "s/[#]*\s*(shared_preload_libraries)\s*=\s*'(.*)'/\1 = 'timescaledb,\2'/;s/,'/'/" /usr/local/share/postgresql/postgresql.conf.sample # buildkit
COPY dir:677063fa858a9e3e3392d377f9eb75100d9ae1e600b44039ee38effad8fb0291 in /docker-entrypoint-initdb.d/
LABEL org.opencontainers.image.created=2026-04-06T16:27:26Z
LABEL org.opencontainers.image.revision=7919065d1c9bfb3a7101340b3ac875877a9a3573
LABEL org.opencontainers.image.source=https://git.thax.es/alexandrump/invest.git
LABEL org.opencontainers.image.url=https://git.thax.es/alexandrump/invest

Labels

Key Value
maintainer Timescale https://www.timescale.com
org.opencontainers.image.created 2026-04-06T16:27:26Z
org.opencontainers.image.revision 7919065d1c9bfb3a7101340b3ac875877a9a3573
org.opencontainers.image.source https://git.thax.es/alexandrump/invest.git
org.opencontainers.image.url https://git.thax.es/alexandrump/invest
Details
Container
2026-04-06 16:27:53 +00:00
11
OCI / Docker
linux/amd64
396 MiB
Versions (1) View all
latest 2026-04-06