Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
ARG PG_TAG
ARG TS_VERSION
############################
# Build tools binaries in separate image
############################
ARG GO_VERSION=1.19.1
FROM golang:${GO_VERSION}-alpine AS tools

ARG TIMESCALEDB_TUNE_VERSION=v0.14.2
ARG TIMESCALEDB_PARALLELCOPY_VERSION=v0.4.0

ENV TOOLS_VERSION 0.8.1

RUN apk update && apk add --no-cache git gcc \
&& go install github.com/timescale/timescaledb-tune/cmd/timescaledb-tune@${TIMESCALEDB_TUNE_VERSION} \
&& go install github.com/timescale/timescaledb-parallel-copy/cmd/timescaledb-parallel-copy@${TIMESCALEDB_PARALLELCOPY_VERSION}


ARG PG_TAG
FROM postgres:${PG_TAG}
ARG OSS_ONLY

LABEL maintainer="Timescale https://www.timescale.com"

COPY docker-entrypoint-initdb.d/* /docker-entrypoint-initdb.d/
COPY --from=tools /go/bin/* /usr/local/bin/

ARG TS_VERSION
RUN set -ex \
&& mkdir -p /var/lib/apt/lists/partial \
&& apt-get update \
&& apt-get -y install \
\
build-essential \
libssl-dev \
git \
\
dpkg-dev \
gcc \
libc-dev \
make \
cmake \
wget \
libkrb5-dev \
postgresql-server-dev-${PG_MAJOR} \
&& mkdir -p /build/ \
&& git clone https://github.com/timescale/timescaledb /build/timescaledb \
\
# Build current version \
&& 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 ~ \
\
&& apt-get autoremove --purge -y \
\
build-essential \
libssl-dev \
\
dpkg-dev \
gcc \
libc-dev \
make \
cmake \
libkrb5-dev \
&& apt-get clean -y \
&& rm -rf \
"${HOME}/.cache" \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/build \
&& sed -r -i "s/[#]*\s*(shared_preload_libraries)\s*=\s*'(.*)'/\1 = 'timescaledb,\2'/;s/,'/'/" /usr/share/postgresql/postgresql.conf.sample
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,12 @@ To not run `timescaledb-tune` at all, use the `NO_TS_TUNE` environment variable:
```
$ docker run -d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password -e NO_TS_TUNE=true timescale/timescaledb:latest-pg13
```

### About Debian based timescaledb image
Docker.debian file can be used to create a Debian based timescaledb image.
Created images will be based on official debian based postgresql images.

For an image based on PG 13.9-bullesye image:
```
docker build -t timescaledb:2.8.1-pg13-bullseye --build-arg PG_TAG=13.9-bullseye --build-arg TS_VERSION=2.8.1 -f Dockerfile.debian .
```