Skip to content

Commit

Permalink
feat(17): backport changes from 17
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazmi35 authored Nov 12, 2024
1 parent 9755e18 commit 93e0db0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
21 changes: 9 additions & 12 deletions 16/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
# TimescaleDB tools
FROM docker.io/library/golang:alpine AS timescaledb-tools

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

# TimescaleDB extension
# TimescaleDB
FROM docker.io/timescale/timescaledb:2.17.2-pg16-bitnami AS timescaledb

# Select and copy the last 3 versions of the extension
RUN mkdir -p /tmp/lib /tmp/share \
RUN mkdir -p /tmp/lib /tmp/share /tmp/bin \
&& cd /opt/bitnami/postgresql/lib \
&& cp timescaledb.so /tmp/lib \
&& cp -r $(ls . | grep timescaledb- | sort | tail -n 3) /tmp/lib \
&& cp -r $(ls . | grep timescaledb- | grep -v tsl | sort | tail -n 3) /tmp/lib \
&& cp -r $(ls . | grep timescaledb-tsl- | sort | tail -n 3) /tmp/lib \
&& cd /opt/bitnami/postgresql/share/extension \
&& cp -r $(ls . | grep timescaledb | grep .sql) /tmp/share \
&& cp timescaledb.control /tmp/share
&& cp timescaledb.control /tmp/share \
&& cd /usr/local/bin \
&& cp -r $(ls . | grep timescaledb-) /tmp/bin

RUN echo -e "[INFO] TimescaleDB lib files to be installed: \n$(ls /tmp/lib)"

# PostgreSQL Server
FROM docker.io/bitnami/postgresql:16.4.0 AS postgresql

# TimescaleDB tools
COPY --from=timescaledb-tools /go/bin/* /usr/local/bin/
COPY --from=timescaledb /tmp/bin/* /usr/local/bin/

# TimescaleDB extension (We will install last 3 versions)
COPY --from=timescaledb /tmp/lib/* /opt/bitnami/postgresql/lib/
Expand Down
2 changes: 1 addition & 1 deletion 17/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TimescaleDB extension
# TimescaleDB
FROM docker.io/timescale/timescaledb:2.17.2-pg17-bitnami AS timescaledb

# Select and copy the last 3 versions of the extension
Expand Down

0 comments on commit 93e0db0

Please sign in to comment.