Skip to content

Commit 9135c0c

Browse files
committed
Added attempt at alpine based timescaledb toolkit image
1 parent 0852275 commit 9135c0c

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

Dockerfile.alpine

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -----------------------------------------------------------------------------------------------
2+
# POSTGIS and TimescaleDB (inc. toolkit for hyperfunctions) image built for aarch64 support
3+
# using alpine base image.
4+
#
5+
# timescale/timescaledb-ha image is ubuntu based and only currently supports amd64; they are
6+
# working on ARM64 support in timescaledev/timescaledb-ha see:
7+
#
8+
# https://github.com/timescale/timescaledb-docker-ha/pull/355
9+
#
10+
# See this issue for POSTGIS base image aarch64 support discussion:
11+
#
12+
# https://github.com/postgis/docker-postgis/issues/216
13+
# ------- ----------------------------------------------------------------------------------------
14+
15+
# We get POSTGIS and timescale+toolkit from this image
16+
FROM timescaledev/timescaledb-ha:pg15-multi as timescale-ha
17+
18+
19+
# This base image is alpine based - timescale toolkit requires glibc 2.3+ so we install it into alpine image
20+
# This still doesn't work as timescale code is compiled against glibc and some references don't match with gcompat
21+
22+
FROM timescale/timescaledb:latest-pg15
23+
MAINTAINER support@openremote.io
24+
25+
ENV GLIBC_VERSION 2.35-r0
26+
ENV TZ ${TZ:-Europe/Amsterdam}
27+
ENV PGTZ ${PGTZ:-Europe/Amsterdam}
28+
ENV POSTGRES_DB ${POSTGRES_DB:-openremote}
29+
ENV POSTGRES_USER ${POSTGRES_USER:-postgres}
30+
ENV POSTGRES_PASSWORD ${POSTGRES_PASSWORD:-postgres}
31+
32+
# Add glibc
33+
RUN apk add gcompat
34+
35+
36+
COPY --from=timescale-ha /usr/lib/postgresql/15/lib/bitcode/postgis-3/ /usr/local/lib/postgresql/bitcode/
37+
COPY --from=timescale-ha /usr/lib/postgresql/15/lib/postgis* /usr/local/lib/postgresql/
38+
COPY --from=timescale-ha /docker-entrypoint-initdb.d/010_install_timescaledb_toolkit.sh /docker-entrypoint-initdb.d/010_install_timescaledb_toolkit.sh
39+
COPY --from=timescale-ha /usr/lib/postgresql/15/lib/timescaledb* /usr/local/lib/postgresql/
40+
COPY --from=timescale-ha /usr/bin/timescale* /usr/local/bin/
41+
COPY --from=timescale-ha /usr/share/postgresql/15/extension/postgis* /usr/local/share/postgresql/extension/
42+
COPY --from=timescale-ha /usr/share/postgresql/15/extension/timescale* /usr/local/share/postgresql/extension/
43+
44+
HEALTHCHECK --interval=3s --timeout=3s --start-period=2s --retries=30 CMD pg_isready

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Postgresql docker image
22
[![build multirach postgresql Docker image and push to it dockerhub](https://github.com/openremote/postgresql/actions/workflows/postgresql.yml/badge.svg)](https://github.com/openremote/postgresql/actions/workflows/postgresql.yml)
33

4-
PostgreSQL docker image with openremote env variables and post GIS extension.
4+
PostgreSQL docker image with openremote env variables and post GIS extension (PostGIS docker image is only built for linux/amd64 but when this changes then this image is obsolete).

0 commit comments

Comments
 (0)