forked from clevyr/docker-cloudnativepg-timescale
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
32 lines (24 loc) · 926 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#syntax=docker/dockerfile:1.10
ARG CLOUDNATIVEPG_VERSION
FROM ghcr.io/cloudnative-pg/postgresql:$CLOUDNATIVEPG_VERSION
USER root
ARG POSTGRES_VERSION
ARG TIMESCALE_VERSION
RUN <<EOT
set -eux
# Install dependencies
apt-get update
apt-get install -y --no-install-recommends curl
# Add Timescale apt repo
. /etc/os-release 2>/dev/null
echo "deb https://packagecloud.io/timescale/timescaledb/debian/ $VERSION_CODENAME main" >/etc/apt/sources.list.d/timescaledb.list
curl -Lsf https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor >/etc/apt/trusted.gpg.d/timescale.gpg
# Install Timescale
apt-get update
apt-get install -y --no-install-recommends "timescaledb-2-postgresql-$POSTGRES_VERSION=$TIMESCALE_VERSION~debian$VERSION_ID"
# Cleanup
apt-get purge -y curl
rm /etc/apt/sources.list.d/timescaledb.list /etc/apt/trusted.gpg.d/timescale.gpg
rm -rf /var/cache/apt/*
EOT
USER 26