File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,3 +131,44 @@ RUN set -ex \
131131 && cd ~ \
132132 && rm -rf /tmp/citus.tar.gz /tmp/citus-${CITUS_VERSION} \
133133 && apk del .citus-deps .citus-build-deps
134+
135+ # # Adding PostGIS
136+ # Install PostGIS dependencies
137+ RUN apk add --no-cache --virtual .postgis-deps \
138+ geos-dev \
139+ gdal-dev \
140+ proj-dev \
141+ curl \
142+ json-c-dev \
143+ protobuf-c-dev
144+
145+ # Install PostGIS
146+ ARG POSTGIS_VERSION
147+ RUN set -ex \
148+ && apk add --no-cache --virtual .postgis-build-deps \
149+ gcc \
150+ g++ \
151+ libc-dev \
152+ make \
153+ libxml2-dev \
154+ musl-dev \
155+ perl \
156+ clang \
157+ geos-dev \
158+ gdal-dev \
159+ proj-dev \
160+ protobuf-c-dev \
161+ llvm15-dev \
162+ json-c-dev \
163+ && POSTGIS_DOWNLOAD_URL="https://download.osgeo.org/postgis/source/postgis-${POSTGIS_VERSION}.tar.gz" \
164+ && curl -L -o /tmp/postgis.tar.gz "${POSTGIS_DOWNLOAD_URL}" \
165+ && tar -C /tmp -xvf /tmp/postgis.tar.gz \
166+ && chown -R postgres:postgres /tmp/postgis-${POSTGIS_VERSION} \
167+ && cd /tmp/postgis-${POSTGIS_VERSION} \
168+ && PATH="/usr/local/pgsql/bin:$PATH" ./configure \
169+ && make \
170+ && make install \
171+ && cd ~ \
172+ && rm -rf /tmp/postgis.tar.gz /tmp/postgis-${POSTGIS_VERSION} \
173+ && apk del .postgis-deps .postgis-build-deps
174+
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ NAME=postgres
44ORG =samagragovernance
55PG_VER =pg15
66CITUS_VERSION ="11.2.0"
7+ POSTGIS_VERSION =3.1.4
78PG_VER_NUMBER =$(shell echo $(PG_VER ) | cut -c3-)
89TS_VERSION =main
910PREV_TS_VERSION =$(shell wget --quiet -O - https://raw.githubusercontent.com/timescale/timescaledb/${TS_VERSION}/version.config | grep update_from_version | sed -e 's!update_from_version = !!')
@@ -55,7 +56,7 @@ default: image
5556 touch .build_$(TS_VERSION ) _$(PG_VER ) _oss
5657
5758.build_$(TS_VERSION ) _$(PG_VER ) : Dockerfile
58- docker build --build-arg PG_VERSION=$(PG_VER_NUMBER ) --build-arg TS_VERSION=$(TS_VERSION ) --build-arg PREV_IMAGE=$(PREV_IMAGE ) --build-arg CITUS_VERSION=$(CITUS_VERSION ) $(TAG ) .
59+ docker build --build-arg PG_VERSION=$(PG_VER_NUMBER ) --build-arg TS_VERSION=$(TS_VERSION ) --build-arg PREV_IMAGE=$(PREV_IMAGE ) --build-arg CITUS_VERSION=$(CITUS_VERSION ) --build-arg POSTGIS_VERSION= $( POSTGIS_VERSION ) $(TAG ) .
5960 touch .build_$(TS_VERSION ) _$(PG_VER )
6061
6162image : .build_$(TS_VERSION ) _$(PG_VER )
You can’t perform that action at this time.
0 commit comments