@@ -4,6 +4,7 @@ FROM $BASE AS builder
44ARG PG_MAJOR
55ARG EXT_VERSION
66ARG EXT_MAJOR
7+ ARG PG_ROUTING_VERSION
78
89USER 0
910
@@ -12,13 +13,16 @@ RUN set -eux && \
1213 ldconfig -p | awk '{print $NF}' | grep '^/' | sort | uniq > /tmp/base-image-libs.out && \
1314 # Install PostGIS
1415 apt-get update && \
15- apt-get install -y --no-install-recommends "postgresql-${PG_MAJOR}-postgis-${EXT_MAJOR}=${EXT_VERSION}"
16+ apt-get install -y --no-install-recommends \
17+ "postgresql-${PG_MAJOR}-postgis-${EXT_MAJOR}=${EXT_VERSION}" \
18+ "postgresql-${PG_MAJOR}-pgrouting=${PG_ROUTING_VERSION}"
1619
1720# Gather PostGIS system libraries and their licenses
1821RUN mkdir -p /system /licenses && \
1922 # Get libraries
2023 ldd /usr/lib/postgresql/${PG_MAJOR}/lib/address_standardizer*.so \
2124 /usr/lib/postgresql/${PG_MAJOR}/lib/postgis*.so \
25+ /usr/lib/postgresql/${PG_MAJOR}/lib/libpgrouting*.so \
2226 | awk '{print $3}' | grep '^/' | sort | uniq > /tmp/all-deps.out && \
2327 # Extract all the libs that aren't already part of the base image
2428 comm -13 /tmp/base-image-libs.out /tmp/all-deps.out > /tmp/libraries.out && \
@@ -53,9 +57,10 @@ ARG EXT_MAJOR
5357# Licenses
5458COPY --from=builder /licenses /licenses/
5559COPY --from=builder /usr/share/doc/postgresql-${PG_MAJOR}-postgis-${EXT_MAJOR}/copyright /licenses/postgresql-${PG_MAJOR}-postgis-${EXT_MAJOR}/
60+ COPY --from=builder /usr/share/doc/postgresql-${PG_MAJOR}-pgrouting/copyright /licenses/postgresql-${PG_MAJOR}-pgrouting/
5661
5762# Libraries
58- COPY --from=builder /usr/lib/postgresql/${PG_MAJOR}/lib/address_standardizer* /usr/lib/postgresql/${PG_MAJOR}/lib/postgis* /lib/
63+ COPY --from=builder /usr/lib/postgresql/${PG_MAJOR}/lib/address_standardizer* /usr/lib/postgresql/${PG_MAJOR}/lib/postgis* /usr/lib/postgresql/${PG_MAJOR}/lib/libpgrouting* / lib/
5964COPY --from=builder /usr/lib/postgresql/18/lib/bitcode/ /lib/bitcode/
6065
6166# Share
0 commit comments