add h3 extension

16.4
Juanique Voogt 2024-09-25 13:42:09 +02:00
rodzic 9f02f21202
commit 84c0f22ef7
1 zmienionych plików z 27 dodań i 26 usunięć

Wyświetl plik

@ -31,7 +31,7 @@ RUN set -eux \
dpkg-divert --local --rename --add /sbin/initctl
# Generating locales takes a long time. Utilize caching by runnig it by itself
# Generating locales takes a long time. Utilize caching by running it by itself
# early in the build process.
# Generate all locale only on deployment mode build
@ -80,7 +80,6 @@ ARG TIMESCALE_VERSION=2
ARG BUILD_TIMESCALE=true
RUN set -eux \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
@ -94,7 +93,7 @@ RUN set -eux \
#-------------Application Specific Stuff ----------------------------------------------------
# We add postgis as well to prevent build errors (that we dont see on local builds)
# We add postgis as well to prevent build errors (that we don't see on local builds)
# on docker hub e.g.
# The following packages have unmet dependencies:
@ -108,8 +107,10 @@ RUN set -eux \
postgresql-${POSTGRES_MAJOR_VERSION}-postgis-${POSTGIS_MAJOR_VERSION}-scripts \
postgresql-plpython3-${POSTGRES_MAJOR_VERSION} postgresql-${POSTGRES_MAJOR_VERSION}-pgrouting \
postgresql-server-dev-${POSTGRES_MAJOR_VERSION} postgresql-${POSTGRES_MAJOR_VERSION}-cron \
postgresql-${POSTGRES_MAJOR_VERSION}-mysql-fdw && \
pgxn install h3
postgresql-${POSTGRES_MAJOR_VERSION}-mysql-fdw
# Install H3 extension using pgxnclient
RUN pgxn install h3
# TODO a case insensitive match would be more robust
RUN if [ "${BUILD_TIMESCALE}" = "true" ]; then \
@ -117,7 +118,7 @@ RUN if [ "${BUILD_TIMESCALE}" = "true" ]; then \
sh -c "echo \"deb [signed-by=/usr/share/keyrings/timescale.keyring] https://packagecloud.io/timescale/timescaledb/debian/ ${IMAGE_VERSION} main\" > /etc/apt/sources.list.d/timescaledb.list" && \
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor -o /usr/share/keyrings/timescale.keyring && \
apt-get update && \
apt-get -y --no-install-recommends install timescaledb-${TIMESCALE_VERSION}-postgresql-${POSTGRES_MAJOR_VERSION} timescaledb-tools;\
apt-get -y --no-install-recommends install timescaledb-${TIMESCALE_VERSION}-postgresql-${POSTGRES_MAJOR_VERSION} timescaledb-tools; \
fi;
RUN echo $POSTGRES_MAJOR_VERSION >/tmp/pg_version.txt && echo $POSTGIS_MAJOR_VERSION >/tmp/pg_major_version.txt && \
@ -147,7 +148,7 @@ RUN chmod +x *.sh
# Run any additional tasks here that are too tedious to put in
# this dockerfile directly.
RUN set -eux \
&& /scripts/setup.sh;rm /scripts/.pass_*
&& /scripts/setup.sh; rm /scripts/.pass_*
RUN echo 'figlet -t "Kartoza Docker PostGIS"' >> ~/.bashrc