-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
I put it here as a general info for other users (or clevyr team if they still update), this strictly follow instructions from the official package registry: https://packagecloud.io/timescale/timescaledb (which the not the case of the dockerfile of this repo)
ARG CNPG="x"
# get official cnpg image from https://github.com/cloudnative-pg/postgres-containers/pkgs/container/postgresql/versions?filters%5Bversion_type%5D=tagged
# also explore it with 'cat /etc/os-release' to get the debian id
FROM ghcr.io/cloudnative-pg/postgresql:${CNPG}
USER root
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
SHELL ["/bin/bash", "-l", "-c"]
ARG CNPG="x"
ARG TS="x"
ARG DEB="x"
# Install Timescale from https://packagecloud.io/timescale/timescaledb and search for "timescaledb-2-postgresql-"
RUN apt update && apt install -y --no-install-recommends curl
RUN curl -s https://packagecloud.io/install/repositories/timescale/timescaledb/script.deb.sh | bash
RUN PG="${CNPG:0:2}" && PKG="$PG=$TS~debian$DEB" && \
apt install -y --no-install-recommends \
timescaledb-tools timescaledb-toolkit-postgresql-$PG \
timescaledb-2-loader-postgresql-$PKG \
timescaledb-2-postgresql-$PKG
RUN apt purge -y curl
RUN rm -rf /var/cache/apt/* /etc/apt/sources.list.d/timescaledb.list /etc/apt/trusted.gpg.d/timescale.gpg
USER 26Then you can build really specific versions like:
docker build \
--build-arg CNPG=16.0 \
--build-arg TS=2.23.1 \
--build-arg DEB=11-1610 \
-t mycompany/cnpg-ts:16.0.0 .or
docker build \
--build-arg CNPG=17.7 \
--build-arg TS=2.23.1 \
--build-arg DEB=11-1706 \
-t mycompany/cnpg-ts:17.0.0 .or
docker build \
--build-arg CNPG=18.1-system-trixie \
--build-arg TS=2.24.0 \
--build-arg DEB=13-1801 \
-t mycompany/cnpg-ts:18.0.0 .Then the generated image will work seamlessly with the official cnpg operator (1.28 for now).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels