Skip to content

Commit

Permalink
Install timescale tools in image
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentAntoine committed May 23, 2024
1 parent 670bfa5 commit 2a39074
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions infra/docker/database/pg13_16.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,28 @@ ARG PG_MAJOR
ARG TIMESCALEDB_VERSION
ARG POSTGIS_VERSION

############################
# Build tools binaries in separate image
############################
ARG GO_VERSION=1.18.7
FROM golang:${GO_VERSION}-alpine AS tools

ENV TOOLS_VERSION 0.8.1

RUN apk update && apk add --no-cache git gcc musl-dev \
&& go install github.com/timescale/timescaledb-tune/cmd/timescaledb-tune@latest \
&& go install github.com/timescale/timescaledb-parallel-copy/cmd/timescaledb-parallel-copy@latest

############################
# Now build image and copy in tools
############################
FROM postgres:"$PG_MAJOR"-bookworm
ARG PG_MAJOR
ARG TIMESCALEDB_VERSION
ARG POSTGIS_VERSION

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

RUN \
apt-get update && \
Expand Down

0 comments on commit 2a39074

Please sign in to comment.