kopia lustrzana https://github.com/kartoza/docker-postgis
add h3 extension
rodzic
9f02f21202
commit
84c0f22ef7
15
Dockerfile
15
Dockerfile
|
@ -31,7 +31,7 @@ RUN set -eux \
|
||||||
dpkg-divert --local --rename --add /sbin/initctl
|
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.
|
# early in the build process.
|
||||||
|
|
||||||
# Generate all locale only on deployment mode build
|
# Generate all locale only on deployment mode build
|
||||||
|
@ -80,7 +80,6 @@ ARG TIMESCALE_VERSION=2
|
||||||
ARG BUILD_TIMESCALE=true
|
ARG BUILD_TIMESCALE=true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RUN set -eux \
|
RUN set -eux \
|
||||||
&& export DEBIAN_FRONTEND=noninteractive \
|
&& export DEBIAN_FRONTEND=noninteractive \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
|
@ -94,7 +93,7 @@ RUN set -eux \
|
||||||
|
|
||||||
#-------------Application Specific Stuff ----------------------------------------------------
|
#-------------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.
|
# on docker hub e.g.
|
||||||
# The following packages have unmet dependencies:
|
# The following packages have unmet dependencies:
|
||||||
|
|
||||||
|
@ -108,8 +107,10 @@ RUN set -eux \
|
||||||
postgresql-${POSTGRES_MAJOR_VERSION}-postgis-${POSTGIS_MAJOR_VERSION}-scripts \
|
postgresql-${POSTGRES_MAJOR_VERSION}-postgis-${POSTGIS_MAJOR_VERSION}-scripts \
|
||||||
postgresql-plpython3-${POSTGRES_MAJOR_VERSION} postgresql-${POSTGRES_MAJOR_VERSION}-pgrouting \
|
postgresql-plpython3-${POSTGRES_MAJOR_VERSION} postgresql-${POSTGRES_MAJOR_VERSION}-pgrouting \
|
||||||
postgresql-server-dev-${POSTGRES_MAJOR_VERSION} postgresql-${POSTGRES_MAJOR_VERSION}-cron \
|
postgresql-server-dev-${POSTGRES_MAJOR_VERSION} postgresql-${POSTGRES_MAJOR_VERSION}-cron \
|
||||||
postgresql-${POSTGRES_MAJOR_VERSION}-mysql-fdw && \
|
postgresql-${POSTGRES_MAJOR_VERSION}-mysql-fdw
|
||||||
pgxn install h3
|
|
||||||
|
# Install H3 extension using pgxnclient
|
||||||
|
RUN pgxn install h3
|
||||||
|
|
||||||
# TODO a case insensitive match would be more robust
|
# TODO a case insensitive match would be more robust
|
||||||
RUN if [ "${BUILD_TIMESCALE}" = "true" ]; then \
|
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" && \
|
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 && \
|
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | gpg --dearmor -o /usr/share/keyrings/timescale.keyring && \
|
||||||
apt-get update && \
|
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;
|
fi;
|
||||||
|
|
||||||
RUN echo $POSTGRES_MAJOR_VERSION >/tmp/pg_version.txt && echo $POSTGIS_MAJOR_VERSION >/tmp/pg_major_version.txt && \
|
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
|
# Run any additional tasks here that are too tedious to put in
|
||||||
# this dockerfile directly.
|
# this dockerfile directly.
|
||||||
RUN set -eux \
|
RUN set -eux \
|
||||||
&& /scripts/setup.sh;rm /scripts/.pass_*
|
&& /scripts/setup.sh; rm /scripts/.pass_*
|
||||||
RUN echo 'figlet -t "Kartoza Docker PostGIS"' >> ~/.bashrc
|
RUN echo 'figlet -t "Kartoza Docker PostGIS"' >> ~/.bashrc
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue