|
| 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 |
0 commit comments